#include <Channel.hpp>
Inheritance diagram for Channel:
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. | |
Transport * | m_pTransportHandler |
Transport handler for validation purpose. |
Implements primitive socket connection for all platforms, for sending/receiving SOAP Envelops with given transport; This implementation abstract the low-level communications.
|
Create a Channel & initialize |
|
Close & clean-up the open socket/system resources. Close, and clean-up any OS specific stuff |
|
Report error on read/write. Log any errors that cause on channel usage/initilaization |
|
OS specific initilization. OS specific initialization should do here
|
|
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. ????
|
|
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.
|
|
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.
|