class EppSessionTcp

This EppSessionTcp is designed to handle a channel connection to the EPP server via TCP/TLS.

Inheritance:


Public Methods

[more] EppSessionTcp()
Creates an EppSessionTcp object, which will use TLS as the transport layer security protocol
[more] EppSessionTcp( bool useTLS )
Creates an EppSessionTcp object, given a flag indicating if TLS should be used as the transport layer security protocol
[more] ~EppSessionTcp()
Destructor
[more]void init( void* object )
Initializes the run-time parameters related to an EPP Session.
[more]void setPrivateKeyFile( char* name, int type )
Sets the client private key file and type.
[more]void setPublicKeyFile( char* name, int type )
Sets the client public key file and type.
[more]void setRemoteKeyFile( char* name )
Sets the server public key file.
[more]void setSocketTimeout( int timeout )
Sets the socket timeout value used for calling setsockopt(2) with parameter SOL_SOCKET, SO_RVCTIMEO and SO_SNDTIMEO, before the socket is bounded.
[more]int getSocketTimeout()
Gets the socket timeout value used for calling setsockopt(2) with parameter SOL_SOCKET, SO_RVCTIMEO and SO_SNDTIMEO, before the socket is bounded.
[more]EppGreeting* connect( const char* host, const int port )
Connects to the EPP Server and establishs an EPP session over TCP/TLS
[more]void close()
Closes the EPP Session over TCP/TLS
[more]EppChannel* getChannel()
Allocates an EPP Channel over TCP/TLS
[more]EppGreeting* hello()
Sends an EPP Hello message to the EPP Server and returns back with an EppGreeting object
[more]int getSocket()
Gets the socket associated with the EPP Session without OpenSSL
[more]SSL* getSSL()
Gets the SSL object associated with the EPP Session using OpenSSL
[more]bool useTLS()
Gets the flag indicating if TLS is used


Inherited from EppSession:

Public Methods

oconst char* getException()
ovoid setException( const char* e )
oconst char* getMessage()
ovoid setMessage( const char* message )


Documentation

This EppSessionTcp is designed to handle a channel connection to the EPP server via TCP/TLS.

o EppSessionTcp()
Creates an EppSessionTcp object, which will use TLS as the transport layer security protocol

o EppSessionTcp( bool useTLS )
Creates an EppSessionTcp object, given a flag indicating if TLS should be used as the transport layer security protocol

o ~EppSessionTcp()
Destructor

ovoid init( void* object )
Initializes the run-time parameters related to an EPP Session. This method must be called before the EPP Session is started. The configuration object can be a Properties object if the implementation choose to use Java Property file, or an DOM_Element object, if the configuration file is in XML format, or an const char * that represents the name of the configuration file in any format.

Parameters:
object - - the configuration object for setting up run-time parameters related to the EPP Session
Note: currently the object is type of char * argv[3], containing the names of three files in SSL_FILETYPE_PEM format:
  • argv[0] - client private key file
  • argv[1] - client public key file
  • argv[2] - server public key file

ovoid setPrivateKeyFile( char* name, int type )
Sets the client private key file and type. The file type must be either SSL_FILETYPE_DER or SSL_FILETYPE_PEM format

ovoid setPublicKeyFile( char* name, int type )
Sets the client public key file and type. The file type must be either SSL_FILETYPE_DER or SSL_FILETYPE_PEM format

ovoid setRemoteKeyFile( char* name )
Sets the server public key file. The file may contains multiple certificates and must be in SSL_FILETYPE_PEM format

ovoid setSocketTimeout( int timeout )
Sets the socket timeout value used for calling setsockopt(2) with parameter SOL_SOCKET, SO_RVCTIMEO and SO_SNDTIMEO, before the socket is bounded. The default value is 0, which indicates that setsockopt(2) will not be called.

oint getSocketTimeout()
Gets the socket timeout value used for calling setsockopt(2) with parameter SOL_SOCKET, SO_RVCTIMEO and SO_SNDTIMEO, before the socket is bounded. The default value is 0, which indicates that setsockopt(2) will not be called.

oEppGreeting* connect( const char* host, const int port )
Connects to the EPP Server and establishs an EPP session over TCP/TLS

Parameters:
host - the host name of the EPP Server to be connected
port - the port number of the EPP Server to be connected
Returns:
an EppGreeting object returned by the EPP server if the connection is successfully established, or null if there is any error
Note: if there is any error occurred during the process of establishing the connection, this method will return null, and getException method should be called for obtaining the details of the error. If the exception returned is null, then the getMessage for obtaining the last message received from the EPP Server

ovoid close()
Closes the EPP Session over TCP/TLS

oEppChannel* getChannel()
Allocates an EPP Channel over TCP/TLS

Returns:
an EppChannel object, or null if the EPP Channel cannot be allocated
Note: only one EPP Channel can be allocated for one EPP Sesseion over TCP/TLS

oEppGreeting* hello()
Sends an EPP Hello message to the EPP Server and returns back with an EppGreeting object

Returns:
an EppGreeting returned by the EPP Server, or null if there is any error

oint getSocket()
Gets the socket associated with the EPP Session without OpenSSL

oSSL* getSSL()
Gets the SSL object associated with the EPP Session using OpenSSL

obool useTLS()
Gets the flag indicating if TLS is used


This class has no child classes.
Author:
Ning Zhang ning.zhang@neustar.com
Version:
$Revision: 1.1 $ $Date: 2001/11/05 20:20:36 $

Alphabetic index HTML hierarchy of classes or Java


Copyright © 2001-2002 NeuStar, Inc. All Rights Reserved.