Interface TransportLayer<P extends Packet<?>>
- All Known Implementing Classes:
AsyncDirectTcpTransport
,DirectTcpTransport
,TunnelTransport
public interface TransportLayer<P extends Packet<?>>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
connect
(InetSocketAddress remoteAddress) Connect to the remote sidevoid
Disconnect from the remote sideboolean
Checks if the transport layer is currently connected.void
Write the packet to the transport.
-
Method Details
-
write
Write the packet to the transport.- Parameters:
packet
- The packet to write.- Throws:
TransportException
-
connect
Connect to the remote side- Parameters:
remoteAddress
- The remote address to connect to- Throws:
IOException
-
disconnect
Disconnect from the remote side- Throws:
IOException
-
isConnected
boolean isConnected()Checks if the transport layer is currently connected.
-