Home
UV module

ConnectReq

Asynchronous connection request for TCP sockets and named pipes.

ConnectReq

#include <icy/request.h>
struct ConnectReq

Defined in src/base/include/icy/request.h:149

Inherits: Request< uv_connect_t >

Asynchronous connection request for TCP sockets and named pipes.

List of all members

NameKindOwner
ConnectReqfunctionDeclared here
connectfunctionDeclared here
connectfunctionDeclared here
reqvariableInherited from Request
callbackvariableInherited from Request
RequestfunctionInherited from Request
invokefunctionInherited from Request
invokefunctionInherited from Request
defaultCallbackfunctionInherited from Request
TypetypedefInherited from Request
EventtypedefInherited from Request

Inherited from Request

KindNameDescription
variablereqThe underlying libuv request object.
variablecallbackCalled when the request completes.
functionRequest inlineConstruct the request and set req.data to this so callbacks can recover the wrapper pointer.
functioninvoke inline -> std::enable_if_t<!std::is_void< std::invoke_result_t< F, Args... > >::value, int >Call f with args. If f returns a non-zero libuv error code, the callback is invoked immediately with that status.
functioninvoke inline -> std::enable_if_t< std::is_void< std::invoke_result_t< F, Args... > >::value >Call f with args. Overload for void-returning functions; no error checking is performed.
functiondefaultCallback static inlineStandard libuv completion callback. Invokes callback with the status event and then deletes the [Request](icy-uv-Request.html#request-2) wrapper.
typedefType
typedefEvent

Public Methods

ReturnNameDescription
ConnectReq inlineConstruct and set req.data to this.
autoconnect inlineInitiate a TCP connection to addr on handle.
autoconnect inlineInitiate a named-pipe connection to name on handle.

ConnectReq

inline

inline ConnectReq()

Defined in src/base/include/icy/request.h:152

Construct and set req.data to this.


connect

inline

inline auto connect(uv_tcp_t * handle, const struct sockaddr * addr)

Defined in src/base/include/icy/request.h:162

Initiate a TCP connection to addr on handle.

Parameters

  • handle Initialized uv_tcp_t to connect.

  • addr Target address (IPv4 or IPv6 sockaddr).

Returns

true if the connect request was submitted successfully.


connect

inline

inline auto connect(uv_pipe_t * handle, const char * name)

Defined in src/base/include/icy/request.h:172

Initiate a named-pipe connection to name on handle.

Parameters

  • handle Initialized uv_pipe_t to connect.

  • name Filesystem path (Unix) or named-pipe name (Windows).

Returns

true if the connect request was submitted successfully.