ParsecClientNewAttempt
ParsecStatusParsecClientNewAttempt(Parsec *ps,const ParsecClientConfig *cfg,const char *attemptID,ParsecProtocolprotocol,ParsecCredentials *creds)
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 | attemptID | The unique attempt ID that the client assigns to this. |
in | protocol | The ParsecProtocol to use for the connection, should always be PROTO_MODE_BUD for non browsers. |
in | creds | The ParsecCredentials for the STUN phase. |
Returns
PARSEC_OK
if the connection attempt is underway, PARSEC_ALREADY_RUNNING
if there is an active connection.