public class HttpTunnelingCommunication extends Object implements ClientCommunicationInterface
| Constructor and Description |
|---|
HttpTunnelingCommunication(ServerSocketInterface ssi,
ISocket cs,
int firstChar)
The instance of this class is created by the client connection listener.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
close()
Closes the current socket connection to the client.
|
String |
getClientDNSName()
Gets the DNS name of this client connection.
|
InetAddress |
getClientInetAddress()
Gets the address of the client.
|
String |
getClientIPAddress()
Gets the IP address of this client connection (as 1.2.3.4).
|
InetAddress |
getServerInetAddress()
Gets the address of the client.
|
ServerSocketInterface |
getServerSocket()
Gets the server socket interface associated with the accept of this socket.
|
ISocket |
getSocket()
Gets socket associated with this communication.
|
void |
hardClose()
Hard-closes the current socket connection to the client.
|
static boolean |
isHttpTunnelingPacket(int firstChar)
Checks if a the HTTP packet is likely to be a HTTP Tunneling Communication packet.
|
byte[] |
receiveTransaction()
Reads a transaction from the client.
|
byte[] |
receiveTransaction(Object[] isCompressed)
Reads a transaction from the client.
|
void |
sendTransaction(byte[] data)
Sends a transaction to the client (=HTTP reply).
|
void |
sendTransaction(byte[] data,
int type)
Sends a transaction to the client.
|
public HttpTunnelingCommunication(ServerSocketInterface ssi, ISocket cs, int firstChar) throws IOException
IOExceptionpublic static boolean isHttpTunnelingPacket(int firstChar)
public InetAddress getClientInetAddress()
getClientInetAddress in interface ClientCommunicationInterfacepublic InetAddress getServerInetAddress()
getServerInetAddress in interface ClientCommunicationInterfacepublic String getClientDNSName()
getClientDNSName in interface SocketNameInterfacepublic String getClientIPAddress()
getClientIPAddress in interface SocketNameInterfacepublic byte[] receiveTransaction()
throws IOException
receiveTransaction in interface ClientCommunicationInterfaceIOExceptionpublic byte[] receiveTransaction(Object[] isCompressed) throws IOException
receiveTransaction in interface ClientCommunicationInterfaceIOExceptionpublic void sendTransaction(byte[] data)
throws IOException
sendTransaction in interface ClientCommunicationInterfaceIOExceptionpublic void sendTransaction(byte[] data,
int type)
throws IOException
sendTransaction in interface ClientCommunicationInterfaceIOExceptionpublic ISocket getSocket()
getSocket in interface ClientCommunicationInterfacepublic ServerSocketInterface getServerSocket()
getServerSocket in interface ClientCommunicationInterfacepublic boolean close()
close in interface ClientCommunicationInterfacepublic void hardClose()
hardClose in interface ClientCommunicationInterfacePhantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.