ParsecClientConnect
ParsecStatusParsecClientConnect(Parsec *ps,const ParsecClientConfig *cfg,const char *sessionID,const char *peerID)
Begin connecting to a remote Parsec host.
Performs authentication, peer-to-peer negotiation, and NAT traversal. This function operates asynchronously and will return immediately. Call ParsecClientGetStatus
to determine if the client has successfully connected or is in an error state.
Parameters
Direction | Name | Description |
---|---|---|
in | ps | Parsec instance returned by ParsecInit . |
in | cfg | Client configuration. May be left NULL to use PARSEC_CLIENT_DEFAULTS . |
in | sessionID | Session ID obtained via the Parsec API. |
in | peerID | Remote host Peer ID obtained via the Parsec API. |
Returns
PARSEC_OK
if the connection attempt is underway, PARSEC_ALREADY_RUNNING
if there is an active connection.