Public Types | |
enum | TState { ENone = 1, EConnecting, EWaiting, ESending } |
Public Member Functions | |
~CListener () | |
void | StartListenerL (TInt &aChannel) |
void | StopListener () |
void | SendData (const TDesC8 &aData) |
TBool | IsConnected () |
Static Public Member Functions | |
static CListener * | NewL (MListenerObserver &aObserver, RSocketServ &aSocketServ) |
static CListener * | NewLC (MListenerObserver &aObserver, RSocketServ &aSocketServ) |
Public Attributes | |
RSocket | iListenSock |
RSocket | iSock |
TSockXfrLength | iLen |
TBuf8< KReceivedBufferSize > | iBuffer |
MListenerObserver & | iObserver |
RSocketServ & | iSocketServ |
TBool | iIsConnected |
TState | iState |
Protected Member Functions | |
void | RunL () |
void | DoCancel () |
TInt | RunError (TInt aError) |
Definition at line 45 of file Listener.h.
CListener::~CListener | ( | ) |
~CConnector()
discussion Destroy the object and release all memory objects
Definition at line 57 of file Listener.cpp.
CListener * CListener::NewL | ( | MListenerObserver & | aObserver, | |
RSocketServ & | aSocketServ | |||
) | [static] |
discussion Create new CListener object return a pointer to the created instance of CListener
Definition at line 10 of file Listener.cpp.
CListener * CListener::NewLC | ( | MListenerObserver & | aObserver, | |
RSocketServ & | aSocketServ | |||
) | [static] |
Definition at line 19 of file Listener.cpp.
void CListener::StartListenerL | ( | TInt & | aChannel | ) |
discussion Starts the listener. listener will open a listening socket and listen on incoming connections.
param aChannel the communication channel (port) the listener listens to.
Definition at line 72 of file Listener.cpp.
void CListener::StopListener | ( | ) |
discussion Stops the listener, closes the listening socket.
Definition at line 181 of file Listener.cpp.
void CListener::SendData | ( | const TDesC8 & | aData | ) |
discussion Sends data to master. user will be prompted to enter the message to send.
param aData the message to be send.
Definition at line 214 of file Listener.cpp.
TBool CListener::IsConnected | ( | ) |
discussion check if listener is connected to.
return true if listener has a connection from master.
Definition at line 304 of file Listener.cpp.
void CListener::RunL | ( | ) | [protected] |
discussion Handle the active objects request completion.
Definition at line 230 of file Listener.cpp.
void CListener::DoCancel | ( | ) | [protected] |
discussion Cancels the outstanding request on active object.
Definition at line 291 of file Listener.cpp.