public final class SubDataClient
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SubDataClient.Encryption |
Constructor and Description |
---|
SubDataClient(ExHost host,
java.lang.String name,
java.net.InetAddress address,
int port,
SubDataClient.Encryption encryption)
SubServers Client Instance
|
Modifier and Type | Method and Description |
---|---|
void |
destroy(boolean reconnect)
Drops All Connections and Stops the SubData Listener
|
void |
forwardPacket(PacketOut packet,
java.net.InetSocketAddress location)
Forward Packet to Server
|
java.net.Socket |
getClient()
Gets the Server Socket
|
SubDataClient.Encryption |
getEncryption()
Gets the Connection's Encryption method
|
java.lang.String |
getName()
Gets the Assigned Host Name
|
static java.util.List<? extends PacketIn> |
getPacket(java.lang.String handle)
Grab PacketIn Instances via handle
|
static void |
registerPacket(java.lang.Class<? extends PacketOut> packet,
java.lang.String handle)
Register PacketOut to the Network
|
static void |
registerPacket(PacketIn packet,
java.lang.String handle)
Register PacketIn to the Network
|
void |
sendPacket(PacketOut packet)
Send Packet to Client
|
static void |
unregisterPacket(java.lang.Class<? extends PacketOut> packet)
Unregister PacketOut to the Network
|
static void |
unregisterPacket(PacketIn packet)
Unregister PacketIn from the Network
|
public SubDataClient(ExHost host, java.lang.String name, java.net.InetAddress address, int port, SubDataClient.Encryption encryption) throws java.io.IOException
host
- SubServers.Hostaddress
- Addressport
- Portjava.io.IOException
public java.lang.String getName()
public java.net.Socket getClient()
public SubDataClient.Encryption getEncryption()
public static void registerPacket(PacketIn packet, java.lang.String handle)
packet
- PacketIn to registerhandle
- Handle to Bindpublic static void unregisterPacket(PacketIn packet)
packet
- PacketIn to unregisterpublic static void registerPacket(java.lang.Class<? extends PacketOut> packet, java.lang.String handle)
packet
- PacketOut to registerhandle
- Handle to bindpublic static void unregisterPacket(java.lang.Class<? extends PacketOut> packet)
packet
- PacketOut to unregisterpublic static java.util.List<? extends PacketIn> getPacket(java.lang.String handle)
handle
- Handlepublic void sendPacket(PacketOut packet)
packet
- Packet to sendpublic void forwardPacket(PacketOut packet, java.net.InetSocketAddress location)
packet
- Packet to sendlocation
- Where to sendpublic void destroy(boolean reconnect) throws java.io.IOException
java.io.IOException