Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: wapcli.h
Link against: wapstkcli.lib

Class RWSPCLConn

RWSPCLConn

Support

Supported from 6.0

Description

Connectionless WSP. WSP (Wireless Session Protocol) is the upper-level application layer of the WAP communications stack. The connectionless mode operates above the datagram transport service, WDP.

For error codes, see TReturnCodes, and RWAPConn::TReturnCodes.

Derivation

RSubSessionBaseClient-side handle to a sub-session
RWAPConnOperations available on connections in all stack layers
RWSPCLConnConnectionless WSP

Defined in RWSPCLConn:
CancelUnitWaitPush(), CancelUnitWaitResult(), Open(), TPushID, TTransID, UnitInvoke(), UnitWaitPush(), UnitWaitResult()

Inherited from RSubSessionBase:
CloseSubSession(), CreateSubSession(), Send(), SendReceive(), SubSessionHandle(), operator=()

Inherited from RWAPConn:
CancelAll(), Close(), EBadConnection, EBearerError, EBufferTooSmall, ECannotOpenPort, EDelete, EGet, EHead, EMoreData, EOptions, EPortAlreadyBound, EPost, EPut, ETooManyConnections, ETrace, GetBearer(), GetLocalPort(), GetRemoteAddress(), TMethod, TPort, TReturnCodes


Member functions


CancelUnitWaitPush()

void CancelUnitWaitPush();

Description

Cancels an asynchronous UnitWaitPush() request.


CancelUnitWaitResult()

void CancelUnitWaitResult();

Description

Cancels an asynchronous UnitWaitResult() request.


Open()

TInt Open(RWAPServ& aServer,TPort aLocalPort);

Description

Initialises a bound connection. This is used to wait for a remote connect (listening). Services that listen for incoming data to a bound connection receive data from all available bearers.

Parameters

RWAPServ& aServer

Handle to the session with the EPOC WAP server

TPort aLocalPort

Local port. If 0, the port is allocated automatically.

Return value

TInt

Error code


Open()

TInt Open(RWAPServ& aServer,
          const TDesC8& aRemoteHost,
          TPort aRemotePort,
          TPort aLocalPort,
          TBearer aBearer,
          TBool aSecureConn);

Description

Initialises a fully specified connection.

Parameters

RWAPServ& aServer

Handle to the session with the EPOC WAP server

const TDesC8& aRemoteHost

Remote address. The format is dependent on the bearer.

TPort aRemotePort

Remote port

TPort aLocalPort

Local port. If 0, the port is allocated automatically.

TBearer aBearer

Bearer to use

TBool aSecureConn

Always EFalse

Return value

TInt

Error code


UnitInvoke()

TInt UnitInvoke(TMethod aMethod,
                const TDesC& aURI,
                const TDesC8& aBody,
                const TDesC8& aHeaders,
                TTransID aID);

Description

Invokes a method on the server.

Parameters

TMethod aMethod

Method type

const TDesC& aURI

URI

const TDesC8& aBody

Data associated with the invoke. This is semantically equivalent to an HTTP entity body. If this method does not use a body, then aBody must be empty.

const TDesC8& aHeaders

WSP headers. ContentType must be the first attribute. This may be empty.

TTransID aID

Transaction ID. It can used to distinguish between transactions. It is sent to the server without any modifications.

Return value

TInt

Error code


UnitWaitPush()

TInt UnitWaitPush(TDes8& aBody,
                  TDes8& aHeaders,
                  TPushID& aID);

Description

Gets push from server, synchronous version.

Parameters

TDes8& aBody

On return, the result body. The buffer is allocated by the caller.

TDes8& aHeaders

On return, WSP headers. The buffer is allocated by the caller.

TPushID& aID

On return, push ID

Return value

TInt

Error code


UnitWaitPush()

void UnitWaitPush(TDes8& aBody,
                  TDes8& aHeaders,
                  TPushID& aID,
                  TRequestStatus& aStatus);

Description

Gets push from server, asynchronous version.

Parameters

TDes8& aBody

On return, the result body. The buffer is allocated by the caller.

TDes8& aHeaders

On return, WSP headers. The buffer is allocated by the caller.

TPushID& aID

On return, push ID

TRequestStatus& aStatus

Asynchronous request status


UnitWaitResult()

TInt UnitWaitResult(TDes8& aBody,
                    TDes8& aHeaders,
                    TTransID& aID);

Description

Gets result from the server after UnitInvoke(), synchronous version. If the passed buffer is smaller than the available data, then the function returns EMoreData and the remaining data can be read with successive calls.

Parameters

TDes8& aBody

On return, the result body. The buffer is allocated by the caller.

TDes8& aHeaders

On return, WSP headers. The buffer is allocated by the caller.

TTransID& aID

On return, transaction ID

Return value

TInt

Error code


UnitWaitResult()

void UnitWaitResult(TDes8& aBody,
                    TDes8& aHeaders,
                    TTransID& aID,
                    TRequestStatus& aStatus);

Description

Gets result from the server after UnitInvoke(), asynchronous version. If the passed buffer is smaller than the available data, then the function returns EMoreData and the remaining data can be read with successive calls.

Parameters

TDes8& aBody

On return, the result body. The buffer is allocated by the caller.

TDes8& aHeaders

On return, WSP headers. The buffer is allocated by the caller.

TTransID& aID

On return, transaction ID

TRequestStatus& aStatus

Asynchronous request status

[Top]


Typedef TPushID

typedef TTransID TPushID;

Description

Push ID.

[Top]


Typedef TTransID

typedef TPckgBuf<unsigned char> TTransID;

Description

Transaction ID.