Name
remove socket, listen.removesocket, kPMRPCListenRemoveSocket — Remove a socket.
Synopsis
void listen.removesocket( |
unique ID); |
|
unique ID : string, length 1..255;
Description
Remove a socket.
Remove a socket listening for incoming connections. Action connections accepted through the removed socket will be immediately closed.
No further connections will be accepted through the removed socket. The socket's port may be used again.
Passing an unknown unique ID has no effect.
Parameters
unique ID. Unique ID of the socket to remove. unique ID is a string. unique ID must be between 1 and 255 characters long, inclusive.
Security
remove socket can be requested by any authenticated client.
Unauthenticated clients are authorized using the uk.co.dssw.powermanager.listen.removesocket right. By default, only local processes belonging to administrator can send a remove socket request.
Examples
Example 64. C: Minimal listen.removesocket
CFStringRef myUniqueID = NULL;
...
CFMutableDictionaryRef myRequest = PMRequestCreateWithParameters(kCFAllocatorDefault, kPMRPCListenRemoveSocket, kPMRPCParameterUniqueID, myUniqueID, nil);