Socket specifies an interface to deliver socket operations to clients. This interface will, by default, cache socket connections and attempt to reuse them.
Terminates the session. This also closes the transport connection associated with this session. If the force parameter is set to TRUE, then the underlying socket is closed. If the force parameter is set to FALSE, then the underlying socket is left open and placed in the cache for later reuse.
void close ( in boolean force ) raises (NetComponents::TransportException, CtsSecurity::TransportException, CtsSecurity::SSLException);
Opens a socket connection to the specified hostname and port number. If reuse_existing is set to TRUE the socket returned may be an open socket from the cache or a new open socket. IF reuse_existing is set to FALSE then a fresh new socket is created and then opened.
void open ( in string hostname, in string port, in boolean reuse_existing ) raises (NetComponents::TransportException, CtsSecurity::TransportException, CtsSecurity::SSLException);
This method opens a transport (TCP/IP) connection to the specified host-port.
Reads data from the peer.
XDT::Binary read ( in long minLength, in long maxLength ) raises (NetComponents::TransportException, CtsSecurity::TransportException, CtsSecurity::SSLException);
Reads data from the peer into the supplied buffer.
void readIntoBuffer ( inout long length, in XDT::Binary bufferRef ) raises (NetComponents::TransportException, CtsSecurity::TransportException, CtsSecurity::SSLException);
This method should only be called from a C++ client.
For Internal Use Only
void setExcess ( in long excess_length, in XDT::Binary bufferRef );
Writes data back into the socket's internal buffers.
The data can be retrieved on the next subsequent read
readIntoBuffer call. Useful if caller has
read more than necessary, but would like the read methods
to now return the excess buffer as part the next few calls to read.
excess_length is the length of the buffer.
bufferRef is the address of the buffer.
Memory for the buffer should be allocated using
JagMemory_alloc
. Responsibilty of freeing the
buffer will now reside with the Socket implementation.
This method is similar to
int putc(int c, FILE *stream);
in functionality.
Should only be called by C++ client.
Sends data to the peer.
void write ( in XDT::Binary data ) raises (NetComponents::TransportException, CtsSecurity::TransportException, CtsSecurity::SSLException);
Sends data in the bufferRef to the peer.
void writeFromBuffer ( in long length, in XDT::Binary bufferRef ) raises (NetComponents::TransportException, CtsSecurity::TransportException, CtsSecurity::SSLException);
This method should only be called from a C++ client.