Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.


From Wiki
Jump to: navigation, search
Article Metadata
Created: vasant21 (18 May 2007)
Last edited: hamishwillee (31 Jul 2012)

Serial communication is sufficient for point-to-point transmission of data, but the physical constraints imposed, and the relative slowness of the transport, prohibits its use for multipoint communication. Networking technologies support communication between multiple devices and employ an addressing mechanism for identification of each machine. Very fast speeds can be achieved through the use of mediums such as Ethernet.

The most common network protocol suite is TCP/IP, which consists of several protocols over two layers. At the network layer, the Internet Protocol (IP) and Internet Control Message Protocol (ICMP) protocols are employed, while at the transport layer, Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) operate.

UDP is an unreliable protocol that provides a datagram (connectionless) service and is suited to simple query and response applications. TCP is reliable and provides stream-oriented connections using data packet sequence numbers to coordinate transmission. Services such as FTP, telnet, email delivery by SMTP and Web services via HTTP are defined at this level, with each service being assigned a specific port number. (A port is an endpoint to a logical connection. Numbers are used to distinguish between different logical channels on the same network interface.)

At the network level, the ICMP protocol detects and announces network errors and congestion. The IP protocol is responsible for routing the data between networks and employs an addressing system to achieve this. IPv4 is supported, and S60 2nd Edition adds support for IPv6 with a dual stack implementation provided by Symbian OS v7.0s.



A primary motivation for the introduction of IPv6 was the need for more IP addresses. An increase in address size from 32-bit to 128-bit means that it supports more levels of addressing hierarchy and ultimately more unique addresses. There are further differences between IPv4 and IPv6, in particular the format of the headers, but in general, applications do not need to be concerned about the IP version. However, if an address is to be stored, displayed or manipulated, then you will need to check whether it is an IPv4 or IPv6 address, as the size and format of the addresses differ. This can be achieved through a call to TInetAddr::Family().

IPv6 also offers increased performance and enhanced security and is mandated by 3GPP standards.

TCP/IP programming for S60

To communicate over TCP/IP you use the Sockets API, specifying the TCP/IP family as the protocol. The general principles of sockets programming, are followed, as described in the Sockets section. An important point to note is that a network interface needs to be started to provide the transport for the connection. There can be many Internet Access Points (IAPs) defined (the device may know many different ways to connect to the Internet), and you can choose whichever one you wish to use, or just use the default setup.

Symbian OS implements TCP/IP as a plugin to the socket server.

The main features are as follows:

  • Sockets are available for the IP, ICMP, TCP, and UDP protocols.
  • Socket services are provided through the generic interface RSocket.
  • Domain name services (DNS) are available through the generic host name resolution interface RHostResolver.

A socket address, specifying an IP address and port, is encapsulated in a TInetAddr object. It stores either an IPv4 (32-bit integer) or an IPv6 address (encapsulated in the class TIp6Addr). The TCP/IP plugin also provides the security protocols for secure electronic commerce, the Transport Layer Security (TLS) and Secure Sockets Layer (SSL). Secure sockets are accessed through the CSecureSocket class.

Also related to security is support for IPSec. This IP layer protocol is used to secure host-to-host or firewall-to-firewall communication. IPSec is a plugin module to the IP stack, and provides tunneling, authentication and encryption for both IPv4 and IPv6.

Other important components

  • Connection management API
  • RConnection, which allows an application to use a specific Internet Access Point
  • NIFMAN, a server to control network interfaces, and the communications database
  • CommDB, which stores all of the configuration settings.

External links

In the meanwhile read Basics of SMTP at

Exchange 2003 SMTP Auth Login at

This page was last modified on 31 July 2012, at 10:24.
32 page views in the last 30 days.