public class RemoteSocket extends Object
| Modifier and Type | Field and Description |
|---|---|
String | hostThe destination host. |
int | portThe destination port. |
| Modifier and Type | Method and Description |
|---|---|
void | close()Closes the socket. |
IOException | completeOpen()Waits for the open operation to complete and returns a possible exception. |
IOException | getException()Gets the exception that occurred on the tunneled socket of the server. |
byte[] | getInputData()Gets a buffer of data from the tunneled socket of the server. |
boolean | hasInputData()Checks if there is any unread data present from the tunneled socket of the server. |
boolean | isOpened()Checks if the socket is opened, successfully or with an exception. |
void | registerInputNotification(IRemoteSocket notifier)Registers a notification interface when data is received at the remote server input stream of the socket. |
void | write(byte[] buf, int offset, int count)Write data to the socket output stream. |
public final String host
public final int port
public boolean isOpened()
public IOException completeOpen()
public void registerInputNotification(IRemoteSocket notifier)
notifier - The notification interface.public boolean hasInputData()
Make sure to also check for error using getException().
public byte[] getInputData()
Make sure to also check for error using getException().
public IOException getException()
public void write(byte[] buf,
int offset,
int count)
throws IOExceptionbuf - The byte buffer.offset - The position in the byte buffer.count - Count of bytes to write.IOException - If the socket is closed.public void close()
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© 2026 Mindus SARL. All rights reserved.