Public Member Functions | |
CRConnection (CConsoleBase *aConsole) | |
~CRConnection () | |
void | StartESOCK () |
void | DemoApiWithoutDbOverrideL () |
void | DemoApiWithDbOverrideL () |
void | AttachToExistingInterfaceL () |
TInt | ConnectWithDbOverrideL () |
TInt | ConnectWithoutDbOverrideL () |
void | GetProgressNotification () |
void | DisplayProgressinfo (const TNifProgress &aProgress) |
void | DisplaySectionToDemo (const TDesC &aText) |
TInt | PrepareSocket () |
TInt | SendUdpData (TUint aPayloadSize) |
TInt | RecvUdpData (TUint aPayloadSize) |
void | DataSendAndReceive (TUint aPayloadSize) |
void | DataTransferredRequest () |
void | DataTransferNotificationRequest () |
Definition at line 25 of file rconnection.h.
CRConnection::CRConnection | ( | CConsoleBase * | aConsole | ) |
Constructor.
Definition at line 48 of file rconnection.cpp.
CRConnection::~CRConnection | ( | ) |
Destructor.
Definition at line 71 of file rconnection.cpp.
void CRConnection::StartESOCK | ( | ) |
Connects to the socket server and opens a monitor for receiving interface notification. The client is notified via monitor, whenever another connection that uses a socket server (iSocketServ) goes up or down.
Definition at line 83 of file rconnection.cpp.
void CRConnection::DemoApiWithoutDbOverrideL | ( | ) |
Demonstrates the following RConnection functionality: 1) requests connection/disconnection (interface up/down) notification 2) starts an explicit connection without Commdb override 3) obtains and prints connection progress information 4) prepares socket for data transfer 5) sends and receives data over the socket 6) prints the amount of data transferred 7) closes the socket and connection
Definition at line 552 of file rconnection.cpp.
void CRConnection::DemoApiWithDbOverrideL | ( | ) |
Demonstrates the following RConnection functionality: 1) requests connection/disconnection (interface up/down) notification 2) starts an explicit connection with CommDb override 3) obtains and prints connection progress information 4) prepares socket for data transfer 5) sends and receives data over the socket 6) requests data send and receive notification 7) closes the socket and connection
Definition at line 631 of file rconnection.cpp.
void CRConnection::AttachToExistingInterfaceL | ( | ) |
Attaches a connection to an undelying interface. This demonstrates the following RConnection functionality: 1) Opens 2 connections and starts one of them. The other is not yet associated with an underlying interface. 2) Gets the connection info of the 1st connection. 3) Attaches the 2nd connection to the existing interface, 4) Gets the current state of the attached connection. 5) Closes both connections.
Definition at line 709 of file rconnection.cpp.
TInt CRConnection::ConnectWithDbOverrideL | ( | ) |
Starts an explicit connection, overriding the default Commdb connection settings.
Definition at line 140 of file rconnection.cpp.
TInt CRConnection::ConnectWithoutDbOverrideL | ( | ) |
Starts an explicit connection using the default CommDb connection preferences. CommDb is the Symbian platform Communications Database.
'Explicit' means the connection is established using an RConnection instance, rather than implicitly, where the application opens and uses an RSocket or RHostResolver rather than RConnection.
Definition at line 111 of file rconnection.cpp.
void CRConnection::GetProgressNotification | ( | ) |
Gets progress notification about the connection. RConnection::ProgressNotification() is used to monitor the state of the connection as it undergoes various stages before it is fully established.
Definition at line 176 of file rconnection.cpp.
void CRConnection::DisplayProgressinfo | ( | const TNifProgress & | aProgress | ) |
Gets progress information at each stage of the connection.
aProgress | Filled with progress/error information on completion. |
Definition at line 199 of file rconnection.cpp.
TInt CRConnection::PrepareSocket | ( | ) |
Prepares the socket for carrying out data transfer by: 1) opening the socket and associating it with the connection. 2) setting options on the socket and the local port for it.
Definition at line 263 of file rconnection.cpp.
TInt CRConnection::SendUdpData | ( | TUint | aPayloadSize | ) |
Sends UDP data (an ICMP packet) over the socket specified to the address specified.
aPayloadSize | The size of the packet to send. |
Definition at line 296 of file rconnection.cpp.
TInt CRConnection::RecvUdpData | ( | TUint | aPayloadSize | ) |
Receives UDP packet from the network
aPayloadSize | The size of the packet to receive |
Definition at line 329 of file rconnection.cpp.
void CRConnection::DataSendAndReceive | ( | TUint | aPayloadSize | ) |
Sends and receives data.
Definition at line 420 of file rconnection.cpp.
void CRConnection::DataTransferredRequest | ( | ) |
Gets and prints the amount of data transmitted and received.
Definition at line 455 of file rconnection.cpp.
void CRConnection::DataTransferNotificationRequest | ( | ) |
Requests notification when an amount of data equal to a threshold value has been sent and received. The threshold used here is 100 bytes.
Definition at line 476 of file rconnection.cpp.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.