Location:
es_sock.h
Link against: esock.lib
RSocketServ
Supported from 5.0
Provides the Connect()
function to create an IPC
communication channel to the socket server. To close the channel
RHandleBase
provides a Close()
function. The prime
use for instances of RSocketServ
is to establish subsession
communications for RSocket
, RHostResolver
and
RNetDatabase
. Any of the resources which are open using the
session are automatically closed when the session is terminated. The following
operations are also provided:
NumProtocols()
- enumerates the number of
protocols of which the socket server is currently aware.
GetProtocolInfo()
- returns information about
protocols of which the socket server is currently aware.
FindProtocol()
- find a protocol by name.
StartProtocol()
- load a protocol
asynchronously.
This class is not intended for user derivation
|
Defined in RSocketServ
:
Connect()
, FindProtocol()
, GetProtocolInfo()
, NumProtocols()
, StartProtocol()
, Version()
Inherited from RHandleBase
:
Close()
,
Duplicate()
,
Handle()
,
SetHandle()
Inherited from RSessionBase
:
Attach()
,
CreateSession()
,
EAutoAttach
,
EExplicitAttach
,
Send()
,
SendReceive()
,
SetRetry()
,
Share()
,
TAttachMode
TInt Connect(TUint aMessageSlots=KESockDefaultMessageSlots);
Opens a session to the socket server.
Notes:
The number of message slots indicates how many asychronous operations are
allowed to be uncompleted at any one time by the combined resources opened on
the session. The result of having too few slots is not fatal. However, operations may
return KErrServerBusy
indicating that no message slot was
available after a small time trying.
Close()
should be called once the session is no
longer required. All resources which are opened using the session will be
automatically closed when the session terminates.
When the last session which has open resources for a protocol is closed a protocol module will be unloaded automatically by the socket server.
|
|
TVersion Version() const;
Gets the version of this client.
|
TInt NumProtocols(TUint& aCount);
Gets the number of protocols the socket server currently is aware of.
Note:
The count returned can be used in conjunction with
GetProtocolInfo()
.
|
|
TInt GetProtocolInfo(TUint anIndex,TProtocolDesc& aProtocol);
Gets information about all protocols.
|
|
TInt FindProtocol(const TProtocolName& aName,TProtocolDesc& aProtocol);
Gets the description of a protocol by name.
|
|
void StartProtocol(TUint aFamily,TUint aSockType,TUint aProtocol,
TRequestStatus& aStatus);
Loads a protocol specified by family, socket type and protocol identifier. Note that client programs do not normally need to call this function, as loading of a protocol is done automatically by the Sockets Server when a socket of that protocol is opened. Some applications may, however, need to ensure that an open socket call will not take a significant amount of time. This function can be called by such applications to preload the protocol.
There is no way to cancel this operation once it has been called.
|