Interface TransportLayer<P extends Packet<?>>
-
- All Known Implementing Classes:
AsyncDirectTcpTransport,DirectTcpTransport,TunnelTransport
public interface TransportLayer<P extends Packet<?>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconnect(java.net.InetSocketAddress remoteAddress)Connect to the remote sidevoiddisconnect()Disconnect from the remote sidebooleanisConnected()Checks if the transport layer is currently connected.voidwrite(P packet)Write the packet to the transport.
-
-
-
Method Detail
-
write
void write(P packet) throws TransportException
Write the packet to the transport.- Parameters:
packet- The packet to write.- Throws:
TransportException
-
connect
void connect(java.net.InetSocketAddress remoteAddress) throws java.io.IOExceptionConnect to the remote side- Parameters:
remoteAddress- The remote address to connect to- Throws:
java.io.IOException
-
disconnect
void disconnect() throws java.io.IOExceptionDisconnect from the remote side- Throws:
java.io.IOException
-
isConnected
boolean isConnected()
Checks if the transport layer is currently connected.
-
-