DCMTK  Version 3.6.1 20120515
OFFIS DICOM Toolkit
Public Member Functions | Private Member Functions
DcmTCPConnection Class Reference

this class represents a TCP/IP based transport connection. More...

+ Inheritance diagram for DcmTCPConnection:

List of all members.

Public Member Functions

 DcmTCPConnection (int openSocket)
 constructor.
virtual ~DcmTCPConnection ()
 destructor
virtual DcmTransportLayerStatus serverSideHandshake ()
 performs server side handshake on established socket.
virtual DcmTransportLayerStatus clientSideHandshake ()
 performs client side handshake on established socket.
virtual DcmTransportLayerStatus renegotiate (const char *newSuite)
 performs a re-negotiation of the connection with different connection parameters.
virtual ssize_t read (void *buf, size_t nbyte)
 attempts to read nbyte bytes from the transport connection and writes them into the given buffer.
virtual ssize_t write (void *buf, size_t nbyte)
 attempts to write nbyte bytes from the given buffer to the transport connection.
virtual void close ()
 Closes the transport connection.
virtual unsigned long getPeerCertificateLength ()
 returns the size in bytes of the peer certificate of a secure connection.
virtual unsigned long getPeerCertificate (void *buf, unsigned long bufLen)
virtual OFBool networkDataAvailable (int timeout)
 checks if data is available to be read on the transport connection.
virtual OFBool isTransparentConnection ()
 returns OFTrue if this connection is a transparent TCP connection, OFFalse if the connection is a secure connection.
virtual OFStringdumpConnectionParameters (OFString &str)
 dump the characteristics of the current connection
virtual const char * errorString (DcmTransportLayerStatus code)
 returns an error string for a given error code.

Private Member Functions

 DcmTCPConnection (const DcmTCPConnection &)
 private undefined copy constructor
DcmTCPConnectionoperator= (const DcmTCPConnection &)
 private undefined assignment operator

Detailed Description

this class represents a TCP/IP based transport connection.


Constructor & Destructor Documentation

constructor.

Parameters:
openSocketTCP/IP socket to be used for the transport connection. the connection must already be establised on socket level. This object takes over control of the socket.

Member Function Documentation

virtual DcmTransportLayerStatus DcmTCPConnection::clientSideHandshake ( ) [virtual]

performs client side handshake on established socket.

This function is used to establish a secure transport connection over the established TCP connection.

Returns:
TCS_ok if successful, an error code otherwise.

Implements DcmTransportConnection.

virtual void DcmTCPConnection::close ( ) [virtual]

Closes the transport connection.

If a secure connection is used, a closure alert is sent before the connection is closed.

Implements DcmTransportConnection.

dump the characteristics of the current connection

Parameters:
strthe string to dump into
Returns:
reference to string

Implements DcmTransportConnection.

virtual const char* DcmTCPConnection::errorString ( DcmTransportLayerStatus  code) [virtual]

returns an error string for a given error code.

Parameters:
codeerror code
Returns:
description for error code

Implements DcmTransportConnection.

virtual unsigned long DcmTCPConnection::getPeerCertificateLength ( ) [virtual]

returns the size in bytes of the peer certificate of a secure connection.

May return 0 if connection is transparent TCP/IP.

Returns:
peer certificate length in bytes

Implements DcmTransportConnection.

virtual OFBool DcmTCPConnection::networkDataAvailable ( int  timeout) [virtual]

checks if data is available to be read on the transport connection.

Parameters:
timeoutmaximum number of seconds to wait if no data is available. If this parameter is 0, the function does not block.
Returns:
OFTrue if data is available, OFFalse otherwise.

Implements DcmTransportConnection.

virtual ssize_t DcmTCPConnection::read ( void *  buf,
size_t  nbyte 
) [virtual]

attempts to read nbyte bytes from the transport connection and writes them into the given buffer.

Parameters:
bufbuffer
nbytenumber of bytes to read
Returns:
number of bytes read, negative number if unsuccessful.

Implements DcmTransportConnection.

virtual DcmTransportLayerStatus DcmTCPConnection::renegotiate ( const char *  newSuite) [virtual]

performs a re-negotiation of the connection with different connection parameters.

Used to change the parameters of the secure transport connection.

Parameters:
newSuitestring identifying the ciphersuite to be negotiated.
Returns:
TCS_ok if successful, an error code otherwise.

Implements DcmTransportConnection.

virtual DcmTransportLayerStatus DcmTCPConnection::serverSideHandshake ( ) [virtual]

performs server side handshake on established socket.

This function is used to establish a secure transport connection over the established TCP connection.

Returns:
TCS_ok if successful, an error code otherwise.

Implements DcmTransportConnection.

virtual ssize_t DcmTCPConnection::write ( void *  buf,
size_t  nbyte 
) [virtual]

attempts to write nbyte bytes from the given buffer to the transport connection.

Parameters:
bufbuffer
nbytenumber of bytes to write
Returns:
number of bytes written, negative number if unsuccessful.

Implements DcmTransportConnection.


The documentation for this class was generated from the following file:


Generated on Tue May 15 2012 for DCMTK Version 3.6.1 20120515 by Doxygen 1.7.5.1-20111027