Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


ESOCK Overview

[Top]


Purpose

The Sockets Client API (sometimes called after its library name ESOCK) provides a generic interface to communications protocols through communication end points known as sockets. The sockets are similar in concept to Berkeley Software Distribution (BSD) sockets from the University of California at Berkeley. They provide a generic interface to network level communications protocols for common operations involved in network computing. These include sending data, receiving data, establishing connections, and configuring network protocols. In addition to sockets, the Sockets Client API provides access points to other network facilities such as hostname resolution, service resolution, protocol information, and various byte manipulation utilities.

[Top]


Required Background

A working knowledge of socket based communications is recommended in order to understand how SymbianOS implements sockets.

In addition, a knowledge of the selected protocol being used will be required if the application is going to set or retrieve protocol specific values (e.g. understanding the data returned by RSocketServ::GetProtocolInfo()), and in particular if Quality of Service (QoS) values are going to be set.

[Top]


Key Concepts/Terms

The Socket Server starts when the OS starts, and receives requests for socket based communications. If a request is received for a particular protocol, Socket Server will load the appropriate protocol module (PRT) to handle that request (if the PRT is not already loaded). Each protocol module may contain several protocols (e.g. the TCP/IP PRT handles UDP, TCP, ICMP, IP (IPv4 and IPv6), and DNS).

[Top]


Architectural relationships

The Sockets architecture provides a generic client interface, and a server to which particular protocol modules can be plugged in. A client uses a particular protocol by supplying protocol-specific parameters to Sockets API functions.

The TCP/IP API enables clients to use sockets for TCP/IP, including UDP, TCP, ICMP, IPv4, IPv6, ARP, and DNS.

The IrDA Sockets API enables clients to use sockets for IrDA infra-red.

The Bluetooth Sockets API enables clients to use sockets for Bluetooth.

The SMS PRT API provides the GSM SMS Protocol stack and the WAP protocol stack over SMS.

[Top]


API Summary

There are six key APIs used for ESOCK socket based communications. They are:


Socket server

The socket server loads and unloads available protocols as required and provides the link between the Socket APIs and the network.

The client interface to the socket server is provided by RSocketServ. RSocketServ must be called first to establish a communication session on which the other ESOCK APIs can operate.

The protocol information interface is provided by TProtocolDesc.


Socket

A socket is a client endpoint to a communications protocol.

The ESOCK client socket interface allows sockets to be opened, connections made, data read and written, connections listened for and accepted, and address and other options set.

The client socket interface is provided by RSocket.


Connection

An active connection is needed for the TCP/IP protocol before communication can begin. This may be set up either implicitly, via the RSocket or RHostResolver APIs, or explicitly via the RConnection API.

RConnection also provides the Connection Management functionality for analysing connections, obtaining statistics etc.


SubConnection

Separate channels can be set up within an active connection and each subconnection channel can be used for one or more separate conversations over the same connection and network interface. One or more sockets can be bound to each subconnection. Quality of Service (QoS), if used, is specified at the subconnection level.


Host name resolver

A host name resolver provides an interface to host name resolution services, such as DNS, that may be provided by particular protocol modules. Host name resolution services convert between addresses and names.

The client host name resolver interface is provided by RHostResolver.


Network database

The network database provides access to network databases, such as LM-IAS with IrDA, that may be provided by particular protocol modules.

The client network database interface is provided by RNetDatabase.

[Top]


See also

Introduction to Sockets

Sockets Client Overview

Sockets Client API Classes

Connection Management

IrDA Sockets Overview

TCP/IP Overview

Secure Sockets (SSL and TLS)

About Quality of Service (QoS)