Name

sockets, listen.sockets, kPMRPCListenSockets, kPMObserveListenSockets — Sockets the engine accepts incoming connections on.

Synopsis

array of socket structures listen.sockets( );

Description

Sockets the engine accepts incoming connections on.

sockets contains a list of listening sockets. The list has no specific order, and the order may change with each request.

When dealing with sockets, refer to a specific socket using that socket's unique ID.

The engine can listen on multiple sockets for incoming connections. The engine supports multiple simultaneous connections; requests are atomic. Each socket is independent of all other listening sockets.

Returns

sockets is an array of socket structures.

Observable

Changes to sockets can be observed, without polling, using listen.sockets, kPMObserveListenSockets.

Security

sockets can be requested by any authenticated client.

Unauthenticated clients are authorized using the uk.co.dssw.powermanager.listen.sockets right. By default, any local process can request sockets.

Availablility

pmdctl

Examples

Example 65. C: listen.sockets

CFMutableDictionaryRef myRequest = PMRequestCreate(kCFAllocatorDefault,kPMRPCListenSockets);


Example 66. Objective-C: listen.sockets

DSSWPMRequest* myRequest = [DSSWPMRequest requestWithRequest:kPMRPCListenSockets];


Example 67. AppleScript: listen.sockets

tell application "Power Manager Scripting"
    set myResult to sockets of Listen
end tell


Example 68. Shell: listen.sockets

./pmctl listen.sockets