EppSessionTcp
This EppSessionTcp
is designed to handle a channel connection to the EPP server via TCP/TLS.
Inheritance:
Public Methods
-
EppSessionTcp()
- Creates an
EppSessionTcp
object, which will use TLS as the transport layer security protocol
-
EppSessionTcp( bool useTLS )
- Creates an
EppSessionTcp
object, given a flag indicating if TLS should be used as the transport layer security protocol
-
~EppSessionTcp()
- Destructor
-
void init( void* object )
- Initializes the run-time parameters related to an EPP Session.
-
void setPrivateKeyFile( char* name, int type )
- Sets the client private key file and type.
-
void setPublicKeyFile( char* name, int type )
- Sets the client public key file and type.
-
void setRemoteKeyFile( char* name )
- Sets the server public key file.
-
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.
-
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.
-
EppGreeting* connect( const char* host, const int port )
- Connects to the EPP Server and establishs an EPP session over TCP/TLS
-
void close()
- Closes the EPP Session over TCP/TLS
-
EppChannel* getChannel()
- Allocates an EPP Channel over TCP/TLS
-
EppGreeting* hello()
- Sends an EPP Hello message to the EPP Server and returns back with an
EppGreeting
object
-
int getSocket()
- Gets the socket associated with the EPP Session without OpenSSL
-
SSL* getSSL()
- Gets the SSL object associated with the EPP Session using OpenSSL
-
bool useTLS()
- Gets the flag indicating if TLS is used
Public Methods
-
const char* getException()
-
void setException( const char* e )
-
const char* getMessage()
-
void setMessage( const char* message )
Documentation
This EppSessionTcp
is designed to handle a channel connection
to the EPP server via TCP/TLS.
- EppSessionTcp()
-
Creates an
EppSessionTcp
object, which will use
TLS as the transport layer security protocol
- EppSessionTcp( bool useTLS )
-
Creates an
EppSessionTcp
object, given a flag
indicating if TLS should be used as the transport
layer security protocol
- ~EppSessionTcp()
-
Destructor
- void 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
- void 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
- void 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
- void setRemoteKeyFile( char* name )
-
Sets the server public key file. The file may contains multiple
certificates and must be in SSL_FILETYPE_PEM format
- 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. The default value is 0, which indicates that setsockopt(2)
will not be called.
- 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. The default value is 0, which indicates that setsockopt(2)
will not be called.
- EppGreeting* 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
- void close()
-
Closes the EPP Session over TCP/TLS
- EppChannel* 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
- EppGreeting* 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
- int getSocket()
-
Gets the socket associated with the EPP Session without OpenSSL
- SSL* getSSL()
-
Gets the SSL object associated with the EPP Session using OpenSSL
- bool 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.