VortexConnection * vortex_connection_new_empty ( VortexCtx ctx,
VortexPeerRole  role 

Allows to create a new VortexConnection from a socket that is already connected.

This function creates the basics structures for a new VortexConnection instance as if it were created with vortex_connection_new but without performing any additional BEEP operation such us sending initial greetings.

This function only takes the given underlying transport descriptor (that is, the socket) and gets the remote peer name in order to set which is the remote host peer.

This function also sets the default handler for sending and receiving data using the send and recv operations. If you are developing a profile which needs to notify the way data is actually sent or received you should change that behavior after calling this function. This is done by using:

ctxThe context where the operation will be performed.
socketAn already connected socket.
roleThe role to be set to the connection being created.
a newly allocated VortexConnection.

Referenced by vortex_websocket_listener_new().