Creates a device which is a socket forwarder or proxy. Provides for improved horizontal scalability, reliability, and isolation.

device(s1, s2)



a raw mode Socket.


a raw mode Socket.


NULL. If the device was successfully created, this function does not return.


Only raw mode sockets may be used with this function. Sockets s1 and s2 must be compatible with each other, i.e. be opposite halves of a two protocol pattern, or both the same protocol for a single protocol pattern.


Warning: this function is designed to be called in an isolated process with the two sockets. Once called, it will block with no ability to interrupt. To terminate the device, the process must be killed (in interactive sessions this may be done by sending SIGQUIT e.g. ctrl + \).