# 6. `windows.pipe` – Inter-Process Communication

`windows.pipe` is wrapper around `_multiprocessing.PipeConnection` simplifiying its use.

The main improvement are:

> - send/recv object from a pipe name in one line
> - Context manager around pipe connection

Note

see sample windows.pipe

## 6.1. Helper functions

`windows.pipe.``create`(addr, security_descriptor=None)

  Create a namedpipe pipe `addr`

  Returns type: | `PipeConnection`

`windows.pipe.``connect`(addr)

  Connect to the named pipe `addr`

  Returns type: | `PipeConnection`

`windows.pipe.``recv_object`(addr)

  Receive an object from pipe `addr`

`windows.pipe.``send_object`(addr, obj)

  Send obj on pipe `addr`

`windows.pipe.``full_pipe_address`(addr)

  Return the full address of the pipe addr

## 6.2. PipeConnection

class `windows.pipe.``PipeConnection`(connection, name=None, server=False)

  A wrapper arround `_multiprocessing.PipeConnection` able to work as a ContextManager

  `close`()

    Close the handle of the pipe

  classmethod `connect`(addr)

    Connect to the named pipe `addr`

    Returns type: | `PipeConnection`

  classmethod `create`(addr, security_descriptor=None)

    Create a namedpipe pipe `addr`

    Returns type: | `PipeConnection`

  classmethod `from_handle`(phandle, *args, **kwargs)

    Create a `PipeConnection` from pipe handle phandle

  `recv`(*args, **kwargs)

    Send an object from the pipe

  `send`(*args, **kwargs)

    Send an object on the pipe

  `wait_connection`()

    Wait for a client process to connect to the named pipe