AsyncSocket.connect

Assigns the network address pointed to by addr, with addrlen specifying the size, n bytes, of this address, as the name of the remote socket. For connection-oriented sockets, also start establishing a connection with that socket and call onConnect once it has.

  1. bool connect(sockaddr* addr, socklen_t addrlen)
    class AsyncSocket
    nothrow
    bool
    connect
    (
    sockaddr* addr
    ,
    socklen_t addrlen
    )
  2. bool connect(NetworkAddress to)

Return Value

Type: bool

true if the name was successfully assigned and - for connection-oriented sockets - if the connection is now being established.

See Also

Meta