Framework | CoreFoundation/CoreFoundation.h |
Declared in | CFSocket.h |
Name server functionality is currently inoperable in Mac OS X.
Returns a socket signature registered with a CFSocket name server.
CFSocketError CFSocketCopyRegisteredSocketSignature ( const CFSocketSignature *nameServerSignature, CFTimeInterval timeout, CFStringRef name, CFSocketSignature *signature, CFDataRef *nameServerAddress );
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.
The time to wait for the server to accept a connection and to reply to the registration request.
The name of the registered socket signature to retrieve.
A pointer to a CFSocketSignature
structure into which the retrieved socket signature is copied.
A pointer to a CFData object into which the name server’s address is copied. Pass NULL
if you do not want the server’s address.
An error code indicating success or failure.
Once you have the socket signature, you can open a connection to that socket with CFSocketCreateConnectedToSocketSignature
.
CFSocket.h
Returns a value registered with a CFSocket name server.
CFSocketError CFSocketCopyRegisteredValue ( const CFSocketSignature *nameServerSignature, CFTimeInterval timeout, CFStringRef name, CFPropertyListRef *value, CFDataRef *nameServerAddress );
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.
The time to wait for the server to accept a connection and to reply to the registration request.
The name of the registered value to return.
A pointer to the property list object into which the retrieved value should be copied.
A pointer to a CFData object into which the name server’s address is copied. Pass NULL
if you do not want the server’s address.
An error code indicating success or failure.
CFSocket.h
Returns the default port number with which to connect to a CFSocket name server.
UInt16 CFSocketGetDefaultNameRegistryPortNumber ( void );
The default port number with which to connect to a CFSocket name server.
If you do not provide a name server signature or leave out the socket address in the signature when calling one of the name registry functions, such as CFSocketRegisterSocketSignature
, the returned port number is used for the connection.
CFSocket.h
Registers a socket signature with a CFSocket name server.
CFSocketError CFSocketRegisterSocketSignature ( const CFSocketSignature *nameServerSignature, CFTimeInterval timeout, CFStringRef name, const CFSocketSignature *signature );
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.
The time to wait for the server to accept a connection and to reply to the registration request.
The name with which to register signature.
The socket signature to register.
An error code indicating success or failure.
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
.
CFSocket.h
Registers a property-list value with a CFSocket name server.
CFSocketError CFSocketRegisterValue ( const CFSocketSignature *nameServerSignature, CFTimeInterval timeout, CFStringRef name, CFPropertyListRef value );
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.
The time to wait for the server to accept a connection and to reply to the registration request.
The name with which to register value.
The property-list value to register.
An error code indicating success or failure.
To remove a registered value from the name server, use CFSocketUnregister
.
CFSocket.h
Sets the default port number with which to connect to a CFSocket name server.
void CFSocketSetDefaultNameRegistryPortNumber ( UInt16 port );
The port number to use to connect to the CFSocket name server.
If you do not provide a name server signature or leave out the socket address in the signature when calling one of the name registry functions, such as CFSocketRegisterSocketSignature
, port will be used for the connection.
CFSocket.h
Unregisters a value or socket signature with a CFSocket name server.
CFSocketError CFSocketUnregister ( const CFSocketSignature *nameServerSignature, CFTimeInterval timeout, CFStringRef name );
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.
The time to wait for the server to accept a connection and to reply to the registration request.
The name of the property-list value or socket signature to unregister.
An error code indicating success or failure.
The value being unregistered was previously registered with CFSocketRegisterValue
or CFSocketRegisterSocketSignature
.
CFSocket.h
Not used.
const CFStringRef kCFSocketCommandKey; const CFStringRef kCFSocketNameKey; const CFStringRef kCFSocketValueKey; const CFStringRef kCFSocketResultKey; const CFStringRef kCFSocketErrorKey; const CFStringRef kCFSocketRegisterCommand; const CFStringRef kCFSocketRetrieveCommand;
kCFSocketCommandKey
Not used.
Available in Mac OS X v10.0 and later.
Declared in CFSocket.h
.
kCFSocketNameKey
Not used.
Available in Mac OS X v10.0 and later.
Declared in CFSocket.h
.
kCFSocketValueKey
Not used.
Available in Mac OS X v10.0 and later.
Declared in CFSocket.h
.
kCFSocketResultKey
Not used.
Available in Mac OS X v10.0 and later.
Declared in CFSocket.h
.
kCFSocketErrorKey
Not used.
Available in Mac OS X v10.0 and later.
Declared in CFSocket.h
.
kCFSocketRegisterCommand
Not used.
Available in Mac OS X v10.0 and later.
Declared in CFSocket.h
.
kCFSocketRetrieveCommand
Not used.
Available in Mac OS X v10.0 and later.
Declared in CFSocket.h
.
CFSocket.h
© 2003, 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-10-27)