Function

CFSocketRegisterSocketSignature

Registers a socket signature with a CFSocket name server.

Declaration

CFSocketError CFSocketRegisterSocketSignature(const CFSocketSignature *nameServerSignature, CFTimeInterval timeout, CFStringRef name, const CFSocketSignature *signature);

Parameters

nameServerSignature

The socket signature for the name server. If NULL, this function contacts the default server, which is assumed to be a local process using TCP/IP to listen on the port number returned from CFSocketGetDefaultNameRegistryPortNumber. If nameServerSignature is incomplete, the missing values are replaced with the default server’s values, if appropriate.

timeout

The time to wait for the server to accept a connection and to reply to the registration request.

name

The name with which to register signature.

signature

The socket signature to register.

Return Value

An error code indicating success or failure.

Discussion

Once a socket signature is registered, other processes can retrieve it with CFSocketCopyRegisteredSocketSignature and then open a connection to your socket using CFSocketCreateConnectedToSocketSignature.

To remove a registered socket signature from the name server, use CFSocketUnregister.

See Also

Core Foundation Socket Name Server Utilities Miscellaneous Functions

CFSocketCopyRegisteredSocketSignature

Returns a socket signature registered with a CFSocket name server.

CFSocketCopyRegisteredValue

Returns a value registered with a CFSocket name server.

CFSocketGetDefaultNameRegistryPortNumber

Returns the default port number with which to connect to a CFSocket name server.

CFSocketRegisterValue

Registers a property-list value with a CFSocket name server.

CFSocketSetDefaultNameRegistryPortNumber

Sets the default port number with which to connect to a CFSocket name server.

CFSocketUnregister

Unregisters a value or socket signature with a CFSocket name server.