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 void
connect(java.net.InetSocketAddress remoteAddress)
Connect to the remote sidevoid
disconnect()
Disconnect from the remote sideboolean
isConnected()
Checks if the transport layer is currently connected.void
write(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.IOException
Connect to the remote side- Parameters:
remoteAddress
- The remote address to connect to- Throws:
java.io.IOException
-
disconnect
void disconnect() throws java.io.IOException
Disconnect from the remote side- Throws:
java.io.IOException
-
isConnected
boolean isConnected()
Checks if the transport layer is currently connected.
-
-