class EppMessageUtil

This EppSessionUtil class contains some utility methods for handling message exchanges between an EPP Server and an EPP Client.

Public Methods

[more]static char* send( int socket, const DOMString& str, int* length )
Sends a string over a socket and reads a string back from the socket
[more]static char* send( SSL* ssl, const DOMString& str, int* length )
Sends a string over a socket and reads a string back from the socket
[more]static char* getEppPayload( int socket, int* length )
Gets the EPP message payload from an input stream
[more]static char* getEppPayload( int socket, int* length, bool* quit, int maxsize )
Gets the EPP message payload from an input stream
[more]static char* getEppPayload( SSL* ssl, int* length )
Gets the EPP message payload from an input stream
[more]static char* getEppPayload( SSL* ssl, int* length, bool* quit, int maxsize )
Gets the EPP message payload from an input stream
[more]static int checkSocket( int sock, int timeout )
Checks if there is timeout/error/input in a socket


Documentation

This EppSessionUtil class contains some utility methods for handling message exchanges between an EPP Server and an EPP Client.

ostatic char* send( int socket, const DOMString& str, int* length )
Sends a string over a socket and reads a string back from the socket

Parameters:
socket - the socket used for sending the string
str - the string to be sent over the socket
length - the length of the string to be returned
Returns:
a string containing the EPP message payload, or an error message if there is any error associated with the connection to the server or running out of memory
Note: the caller should free the memory containing the EPP message payload, if there is no error. If there is any error, the length parameter would be set to 0 and a string containing the error message should not be freed by the caller.

ostatic char* send( SSL* ssl, const DOMString& str, int* length )
Sends a string over a socket and reads a string back from the socket

Parameters:
ssl - the SSL object of OPENSSL used for sending the string
str - the string to be sent over the socket
length - the length of the string to be returned
Returns:
a string containing the EPP message payload, or an error message if there is any error associated with the connection to the server or running out of memory
Note: the caller should free the memory containing the EPP message payload, if there is no error. If there is any error, the length parameter would be set to 0 and a string containing the error message should not be freed by the caller.

ostatic char* getEppPayload( int socket, int* length )
Gets the EPP message payload from an input stream

Parameters:
socket - the socket from which the EPP message payload is retrieved
length - the length of the string to be returned
Returns:
a string containing the EPP message payload, or an error message if there is any error associated with the connection to the server or running out of memory
Note: the caller should free the memory containing the EPP message payload, if there is no error. If there is any error, the length parameter would be set to 0 and a string containing the error message should not be freed by the caller.

ostatic char* getEppPayload( int socket, int* length, bool* quit, int maxsize )
Gets the EPP message payload from an input stream

Parameters:
socket - the socket from which the EPP message payload is retrieved
length - the length of the string to be returned
quit - the flag indicating if the thread should quit without completing the reading. The flag is set by another thread to notify the thread to exit.
the - maximum EPP message payload size, or 0 if there is no limit
Returns:
a string containing the EPP message payload, or an error message if there is any error associated with the connection to the server or running out of memory
Note: the caller should free the memory containing the EPP message payload, if there is no error. If there is any error, the length parameter would be set to 0 and a string containing the error message should not be freed by the caller. if
Note: if the maximum size is reached, the length parameter is set to the negative of message length received

ostatic char* getEppPayload( SSL* ssl, int* length )
Gets the EPP message payload from an input stream

Parameters:
ssl - the SSL object of OPENSSL from which the EPP message payload is retrieved
length - the length of the string to be returned
Returns:
a string containing the EPP message payload, or an error message if there is any error associated with the connection to the server or running out of memory
Note: the caller should free the memory containing the EPP message payload, if there is no error. If there is any error, the length parameter would be set to 0 and a string containing the error message should not be freed by the caller.

ostatic char* getEppPayload( SSL* ssl, int* length, bool* quit, int maxsize )
Gets the EPP message payload from an input stream

Parameters:
ssl - the SSL object of OPENSSL from which the EPP message payload is retrieved
length - the length of the string to be returned
quit - the flag indicating if the thread should quit without completing the reading. The flag is set by another thread to notify the thread to exit.
the - maximum EPP message payload size, or 0 if there is no limit
Returns:
a string containing the EPP message payload, or an error message if there is any error associated with the connection to the server or running out of memory
Note: the caller should free the memory containing the EPP message payload, if there is no error. If there is any error, the length parameter would be set to 0 and a string containing the error message should not be freed by the caller.
Note: if the maximum size is reached, the length parameter is set to the negative of message length received

ostatic int checkSocket( int sock, int timeout )
Checks if there is timeout/error/input in a socket
Parameters:
sock - socket to be checked
timeout - timeout in seconds
Returns:
1 for input, 0 for timeout, -1 for error


This class has no child classes.
Author:
Ning Zhang ning.zhang@neustar.com
Version:
$Revision: 1.1.1.1 $ $Date: 2005/12/06 20:11:35 $

Alphabetic index HTML hierarchy of classes or Java


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