This topic introduces the Sockets Server API and discusses the main classes.
The Sockets Server Client interfaces make asynchronous calls to the Sockets Server. The Server co-ordinates client access to socket services, and manages communications with the protocol plug-ins that provide support for the particular networking protocols.
Each protocol plug-in may contain a number of protocols. The term ‘protocol’ may also be used to describe a suite of protocols. For example, the TCP/IP protocol plug-in contains UDP, TCP, ICMP, IP, and DNS. Sockets can access UDP and TCP to transfer data over IP. Another example of a protocol plug-in is the IrDA plug-in. the IrDA plug-in is used for communicating over infrared.
The Sockets Server loads protocols plug-ins at runtime either explicitly or on demand. When the server starts, the server scans \private\101f7989\esock for .esk files to see which protocols and services are defined, and which protocols to load.
The Sockets Server Client API implements the idea of transport independence : different protocols are accessed through the same API. However, individual protocols exhibit different properties and semantics regarding socket behaviour. The semantics implemented by any given protocol can be found by interrogating the system using RSocketServ::GetProtocolInfo() , which describes the protocol semantics encapsulated in a TProtocolDesc .
Five main classes provide the Sockets Server Client API functionality:
The RSocketServ class establishes and reserves resources for the base communication session to the Sockets Server. The RSocketServ hosts other Sockets Server Client APIs as subsessions inside the RSocketServ session. The Sockets Server Client APIs which are hosted as subsessions inside RSocketServ are RSocket , RHostResolver , RConnection and RSubConnection . The RSocketServ class provides functions to load and query protocols.
The RSocket class provides a client endpoint to a protocol. It provides the following services:
socket creation
reading from and writing to a protocol
binding to addresses
active connecting
passive connection through the listen/accept model
The RConnection class provides access to the Connection Management functionality of a socket. See Connection Management .
The RSubConnection API provides functions to specify Quality of Service parameters for a channel. See SubConnection Client API .
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.