Main Page | Class Hierarchy | Data Structures | File List | Data Fields | Globals

CConcreteConnection Class Reference

CConcreteConnection class encapsulates the real socket in the server side. More...

#include <concreteconnection.h>

Inheritance diagram for CConcreteConnection:

CNUDPConnection

Public Types

enum  TConnectionFailure { ENoSocket = 67000, ESocketClosed, EBadMessage }
enum  TInitError { ENullSocket = 68000, ENullSocketServ }

Public Member Functions

CServerSessionGetSession ()
 ~CConcreteConnection ()
TBool IsListening ()
void ReceiveL (const RMessage &aMessage)
void CancelReceive ()
void Close (TBool aImmediately=EFalse)
 Closes the wrapped socket.

void SendL (TDesC8 *aBuf)
void ListenL (const RMessage &aMessage)
void CancelListen ()
TInt GetMTU ()

Static Public Member Functions

CConcreteConnectionNewL (RSocket *aSocket, CServerSession &aSession, TInt aMtu)
CConcreteConnectionNewListeningL (RSocket *aSocket, RSocketServ *aSocketServ, CServerSession &aSession)

Protected Member Functions

void ConstructL (TBool aIsListening)
 CConcreteConnection (RSocket *aSocket, RSocketServ *aSocketServ, CServerSession &aSession, TInt aMtu)

Protected Attributes

CAsynchSendiSender
CAsynchListeniListener
CAsynchReceiveiReceiver

Private Member Functions

RSocket & GetSocket ()
RSocketServ & GetSocketServ ()

Private Attributes

TBool iIsListening
TBool iIsClosed
CServerSessioniSession
RSocket * iSocket
RSocketServ * iSocketServ
TInt iMtu

Detailed Description

CConcreteConnection class encapsulates the real socket in the server side.

CConcreteConnection is a facade to the classes that actually manage the socket (CAsynchSend, CAsynchReceive, CASynchListen).

Author:
Matti Dahlbom

Matti Kokkola

Version:
beta0_9_1_2004-01-13, 1.16

Definition at line 48 of file concreteconnection.h.


Member Enumeration Documentation

enum CConcreteConnection::TConnectionFailure
 

Enumeration values:
ENoSocket 
ESocketClosed 
EBadMessage 

Definition at line 51 of file concreteconnection.h.

enum CConcreteConnection::TInitError
 

Enumeration values:
ENullSocket 
ENullSocketServ 

Definition at line 57 of file concreteconnection.h.


Constructor & Destructor Documentation

CConcreteConnection::~CConcreteConnection  ) 
 

Definition at line 77 of file concreteconnection.cpp.

References Close(), CServerSession::DeallocateConnection(), iIsListening, iSession, and iSocketServ.

CConcreteConnection::CConcreteConnection RSocket *  aSocket,
RSocketServ *  aSocketServ,
CServerSession aSession,
TInt  aMtu
[protected]
 

Definition at line 65 of file concreteconnection.cpp.

Referenced by NewL(), and NewListeningL().


Member Function Documentation

void CConcreteConnection::CancelListen  ) 
 

Definition at line 204 of file concreteconnection.cpp.

References iListener.

void CConcreteConnection::CancelReceive  ) 
 

Definition at line 209 of file concreteconnection.cpp.

References iReceiver.

Referenced by CServerSession::CancelReceive().

void CConcreteConnection::Close TBool  aImmediately = EFalse  ) 
 

Closes the wrapped socket.

This operation is synchronous.

Parameters:
aImmediately whether to close the socket immediately (ETrue) or to wait until send/receive has completed.

Definition at line 158 of file concreteconnection.cpp.

References iIsClosed, iIsListening, iListener, iReceiver, iSender, iSocket, and Log::Print().

Referenced by CServerSession::CloseSocket(), CAsynchSend::RunError(), ~CConcreteConnection(), and CServerSession::~CServerSession().

void CConcreteConnection::ConstructL TBool  aIsListening  )  [protected]
 

Definition at line 93 of file concreteconnection.cpp.

References CAsynchListen, CAsynchReceive, CAsynchSend, ENullSocket, iIsListening, iListener, iReceiver, iSender, iSocket, and Log::Print().

Referenced by CNUDPConnection::NewL(), NewL(), CNUDPConnection::NewListeningL(), and NewListeningL().

TInt CConcreteConnection::GetMTU  ) 
 

Definition at line 216 of file concreteconnection.cpp.

References iMtu.

Referenced by CNUDPConnection::SendL().

CServerSession& CConcreteConnection::GetSession  )  [inline]
 

Definition at line 69 of file concreteconnection.h.

References iSession.

Referenced by CAsynchListen::RunL().

RSocket& CConcreteConnection::GetSocket  )  [inline, private]
 

Definition at line 107 of file concreteconnection.h.

References iSocket.

Referenced by CAsynchListen::DoCancel(), CAsynchReceive::DoCancel(), CAsynchSend::DoCancel(), CAsynchListen::ListenL(), CAsynchReceive::Receive(), and CAsynchSend::SendFragmentL().

RSocketServ& CConcreteConnection::GetSocketServ  )  [inline, private]
 

Definition at line 108 of file concreteconnection.h.

References iSocketServ.

Referenced by CAsynchListen::ListenL().

TBool CConcreteConnection::IsListening  )  [inline]
 

Definition at line 72 of file concreteconnection.h.

References iIsListening.

Referenced by CServerSession::AllocateConnection(), and CServerSession::DeallocateConnection().

void CConcreteConnection::ListenL const RMessage &  aMessage  ) 
 

Definition at line 130 of file concreteconnection.cpp.

References ENoSocket, iListener, iSocket, CAsynchListen::ListenL(), and Log::Print().

Referenced by CServerSession::GetIncomingConnection().

CConcreteConnection * CConcreteConnection::NewL RSocket *  aSocket,
CServerSession aSession,
TInt  aMtu
[static]
 

Reimplemented in CNUDPConnection.

Definition at line 35 of file concreteconnection.cpp.

References CConcreteConnection(), and ConstructL().

Referenced by CAsynchListen::RunL().

CConcreteConnection * CConcreteConnection::NewListeningL RSocket *  aSocket,
RSocketServ *  aSocketServ,
CServerSession aSession
[static]
 

Reimplemented in CNUDPConnection.

Definition at line 51 of file concreteconnection.cpp.

References CConcreteConnection(), and ConstructL().

Referenced by CBTCommunicator::OpenListeningSocketL().

void CConcreteConnection::ReceiveL const RMessage &  aMessage  ) 
 

Reimplemented in CNUDPConnection.

Definition at line 144 of file concreteconnection.cpp.

References ESocketClosed, iReceiver, iSocket, Log::Print(), and CAsynchReceive::Receive().

Referenced by CServerSession::Receive().

void CConcreteConnection::SendL TDesC8 *  aBuf  ) 
 

Reimplemented in CNUDPConnection.

Definition at line 114 of file concreteconnection.cpp.

References ESocketClosed, iSender, iSocket, Log::Print(), and CAsynchSend::SendL().

Referenced by CServerSession::Send().


Friends And Related Function Documentation

friend class CAsynchListen [friend]
 

Definition at line 127 of file concreteconnection.h.

Referenced by ConstructL().

friend class CAsynchReceive [friend]
 

Definition at line 128 of file concreteconnection.h.

Referenced by ConstructL().

friend class CAsynchSend [friend]
 

Definition at line 126 of file concreteconnection.h.

Referenced by ConstructL().


Field Documentation

TBool CConcreteConnection::iIsClosed [private]
 

Definition at line 114 of file concreteconnection.h.

Referenced by Close().

TBool CConcreteConnection::iIsListening [private]
 

Definition at line 111 of file concreteconnection.h.

Referenced by Close(), ConstructL(), IsListening(), and ~CConcreteConnection().

CAsynchListen* CConcreteConnection::iListener [protected]
 

Definition at line 101 of file concreteconnection.h.

Referenced by CancelListen(), Close(), ConstructL(), and ListenL().

TInt CConcreteConnection::iMtu [private]
 

Definition at line 124 of file concreteconnection.h.

Referenced by GetMTU().

CAsynchReceive* CConcreteConnection::iReceiver [protected]
 

Definition at line 104 of file concreteconnection.h.

Referenced by CancelReceive(), Close(), ConstructL(), and ReceiveL().

CAsynchSend* CConcreteConnection::iSender [protected]
 

Definition at line 98 of file concreteconnection.h.

Referenced by Close(), ConstructL(), and SendL().

CServerSession& CConcreteConnection::iSession [private]
 

Definition at line 117 of file concreteconnection.h.

Referenced by GetSession(), and ~CConcreteConnection().

RSocket* CConcreteConnection::iSocket [private]
 

Definition at line 120 of file concreteconnection.h.

Referenced by Close(), ConstructL(), GetSocket(), ListenL(), ReceiveL(), and SendL().

RSocketServ* CConcreteConnection::iSocketServ [private]
 

Definition at line 121 of file concreteconnection.h.

Referenced by GetSocketServ(), and ~CConcreteConnection().


The documentation for this class was generated from the following files:
Generated on Tue Jan 13 15:47:09 2004 for CobainAPIImplementation by doxygen 1.3.5