33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/ofstd/oftypes.h"
35 #include "dcmtk/dcmnet/dcmlayer.h"
36 #include "dcmtk/ofstd/ofstream.h"
38 #define INCLUDE_UNISTD
39 #include "dcmtk/ofstd/ofstdinc.h"
80 virtual DcmTransportLayerStatus
renegotiate(
const char *newSuite) = 0;
88 virtual ssize_t
read(
void *buf,
size_t nbyte) = 0;
96 virtual ssize_t
write(
void *buf,
size_t nbyte) = 0;
102 virtual void close() = 0;
117 virtual unsigned long getPeerCertificate(
void *buf,
unsigned long bufLen) = 0;
149 virtual const char *
errorString(DcmTransportLayerStatus code) = 0;
265 virtual DcmTransportLayerStatus
renegotiate(
const char *newSuite);
273 virtual ssize_t
read(
void *buf,
size_t nbyte);
281 virtual ssize_t
write(
void *buf,
size_t nbyte);
287 virtual void close();
302 virtual unsigned long getPeerCertificate(
void *buf,
unsigned long bufLen);
326 virtual const char *
errorString(DcmTransportLayerStatus code);
DcmTransportConnection & operator=(const DcmTransportConnection &)
private undefined assignment operator
this class represents a TCP/IP based transport connection.
virtual unsigned long getPeerCertificateLength()=0
returns the size in bytes of the peer certificate of a secure connection.
virtual DcmTransportLayerStatus clientSideHandshake()=0
performs client side handshake on established socket.
virtual DcmTransportLayerStatus serverSideHandshake()
performs server side handshake on established socket.
this class represents a TCP/IP based transport connection which can be a transparent TCP/IP socket co...
int theSocket
the socket file descriptor used by the transport connection.
virtual DcmTransportLayerStatus serverSideHandshake()=0
performs server side handshake on established socket.
DcmTCPConnection & operator=(const DcmTCPConnection &)
private undefined assignment operator
virtual const char * errorString(DcmTransportLayerStatus code)=0
returns an error string for a given error code.
virtual ssize_t write(void *buf, size_t nbyte)
attempts to write nbyte bytes from the given buffer to the transport connection.
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 void close()
Closes the transport connection.
static OFBool selectReadableAssociation(DcmTransportConnection *connections[], int connCount, int timeout)
indicates which of the specified transport connections is ready for reading.
virtual DcmTransportLayerStatus renegotiate(const char *newSuite)=0
performs a re-negotiation of the connection with different connection parameters. ...
DcmTCPConnection(int openSocket)
constructor.
int getSocket()
returns the socket file descriptor managed by this object.
virtual DcmTransportLayerStatus clientSideHandshake()
performs client side handshake on established socket.
void setSocket(int socket)
set the socket file descriptor managed by this object.
virtual OFString & dumpConnectionParameters(OFString &str)
dump the characteristics of the current connection
virtual ~DcmTCPConnection()
destructor
virtual ssize_t write(void *buf, size_t nbyte)=0
attempts to write nbyte bytes from the given buffer to the transport connection.
virtual OFString & dumpConnectionParameters(OFString &str)=0
dump the characteristics of the current connection
virtual unsigned long getPeerCertificateLength()
returns the size in bytes of the peer certificate of a secure connection.
virtual DcmTransportLayerStatus renegotiate(const char *newSuite)
performs a re-negotiation of the connection with different connection parameters. ...
DcmTransportConnection(int openSocket)
constructor.
virtual ~DcmTransportConnection()
destructor
a simple string class that implements a subset of std::string.
virtual void close()=0
Closes the transport connection.
virtual OFBool isTransparentConnection()
returns OFTrue if this connection is a transparent TCP connection, OFFalse if the connection is a sec...
static OFBool fastSelectReadableAssociation(DcmTransportConnection *connections[], int connCount, int timeout)
indicates which of the specified transport connections is ready for reading.
virtual const char * errorString(DcmTransportLayerStatus code)
returns an error string for a given error code.
virtual ssize_t read(void *buf, size_t nbyte)=0
attempts to read nbyte bytes from the transport connection and writes them into the given buffer...
virtual OFBool networkDataAvailable(int timeout)
checks if data is available to be read on the transport connection.
virtual OFBool networkDataAvailable(int timeout)=0
checks if data is available to be read on the transport connection.
virtual OFBool isTransparentConnection()=0
returns OFTrue if this connection is a transparent TCP connection, OFFalse if the connection is a sec...
static OFBool safeSelectReadableAssociation(DcmTransportConnection *connections[], int connCount, int timeout)
indicates which of the specified transport connections is ready for reading.