Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

Channel Class Reference

The primitive socket implementation for SOAP Envelops passing. More...

#include <Channel.hpp>

Inheritance diagram for Channel:

List of all members.

Public Methods

 Channel ()
virtual bool Open (std::string &p_RemoteNode, unsigned short p_RemoteEnd) throw (ChannelException)
 Open a socket to a given remote node/server address with remote port.

virtual void Close ()
 Close all open sockets and clean up.

virtual const Channel & operator>> (std::string &msg)
 Read from a open socket and store read message in msg.

virtual const Channel & operator<< (const char *msg)
 Write a given message (msg) to the end-point using the open socket.

virtual const std::string & GetLastError ()
 Return last error (if any).

virtual void SetTransportHandler (Transport *transport)
 Set the SOAP transport handler.


Protected Methods

virtual bool Init ()
 OS specific initilization.

virtual void Error (const char *err)
 Report error on read/write.

virtual void CloseChannel ()
 Close & clean-up the open socket/system resources.


Protected Attributes

unsigned int m_Sock
 Socket descriptor.

std::string m_RemoteNode
 Remote address could be IP/host-name.

unsigned short m_RemoteEnd
 Remote port number.

std::string m_LastErr
 Last error as a string.

Transportm_pTransportHandler
 Transport handler for validation purpose.


Detailed Description

The primitive socket implementation for SOAP Envelops passing.

Implements primitive socket connection for all platforms, for sending/receiving SOAP Envelops with given transport; This implementation abstract the low-level communications.


Constructor & Destructor Documentation

Channel::Channel  
 

Create a Channel & initialize


Member Function Documentation

void Channel::CloseChannel   [protected, virtual]
 

Close & clean-up the open socket/system resources.

Close, and clean-up any OS specific stuff

void Channel::Error const char *    err [protected, virtual]
 

Report error on read/write.

Log any errors that cause on channel usage/initilaization

bool Channel::Init   [protected, virtual]
 

OS specific initilization.

OS specific initialization should do here

Returns:
true if successfuly initilaize OS specific stuffs. false o/w

bool Channel::Open std::string &    p_RemoteNode,
unsigned short    p_RemoteEnd
throw (ChannelException) [virtual]
 

Open a socket to a given remote node/server address with remote port.

This channel open INET channel for the time being using primitive sockets Do we need any other type of channel; like shared memory, pipes etc. ????

Parameters:
p_RemoteNode  End point address as hostname/IP
p_RemoteEnd  Port #
Returns:
true if successfuly open a soket to the endpoint. o/w exception is thrown

const Channel & Channel::operator<< const char *    msg [virtual]
 

Write a given message (msg) to the end-point using the open socket.

Write/send a message to the remote server; sending blocks the app. we may need to do this asynchronizely; preferably either non-blocking send or pthread.

Parameters:
Message  to be written to the open channel

const Channel & Channel::operator>> std::string &    msg [virtual]
 

Read from a open socket and store read message in msg.

Read/receive a message from the remote server; reading may be done in chunks.

Parameters:
string  to hold the read Message


The documentation for this class was generated from the following files:
Generated on Fri Apr 9 12:21:29 2004 for axiscpp by doxygen1.2.18