Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



How to get and set IP addresses


Getting and setting the local IP address


Getting

The local IP address and port can be obtained with RSocket::LocalName(). The anAddr argument should be of the class TInetAddr.


Setting

The local IP address and port can be set with RSocket::Bind(). The anAddr argument should be of the class TInetAddr.

This call must be made by server applications before calling RSocket::Listen().

Client applications normally have an IP address automatically allocated to them when a dial-up connection is established.

[Top]


Getting the remote IP address

The IP address and port of the remote host for a connected socket can be obtained with RSocket::RemoteName(). The anAddr argument should be of the class TInetAddr.