net.ME1312.SubServers.Client.Bukkit.Network

## Class SubDataClient

- java.lang.Object
- - net.ME1312.SubServers.Client.Bukkit.Network.SubDataClient

    public final class SubDataClient
    extends java.lang.Object

### Constructor Summary

Constructors
Constructor and Description
`SubDataClient(SubPlugin plugin, java.lang.String name, java.net.InetAddress address, int port)` SubServers Client Instance

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `destroy(boolean reconnect)` Drops All Connections and Stops the SubData Listener
`java.net.Socket` `getClient()` Gets the Server Socket
`java.lang.String` `getName()` Gets the Assigned Server Name
`static PacketIn` `getPacket(java.lang.String handle)` Grab PacketIn Instance via handle
`static void` `registerPacket(java.lang.Class<? extends PacketOut> packet, java.lang.String handle)` Register Packet to the Network
`static void` `registerPacket(PacketIn packet, java.lang.String handle)` Register Packet to the Network
`void` `sendPacket(PacketOut packet)` Send Packet to Client

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SubDataClient

    public SubDataClient(SubPlugin plugin,
                         java.lang.String name,
                         java.net.InetAddress address,
                         int port)
                  throws java.io.IOException

SubServers Client Instance

Parameters:
  `plugin` - SubPlugin
  `address` - Bind Address
  `port` - Port
Throws:
  `java.io.IOException`

### Method Detail

#### getName

    public java.lang.String getName()

Gets the Assigned Server Name

Returns:
  Server Name

#### getClient

    public java.net.Socket getClient()

Gets the Server Socket

Returns:
  Server Socket

#### registerPacket

    public static void registerPacket(PacketIn packet,
                                      java.lang.String handle)

Register Packet to the Network

Parameters:
  `packet` - PacketIn to register
  `handle` - Handle to Bind

#### registerPacket

    public static void registerPacket(java.lang.Class<? extends PacketOut> packet,
                                      java.lang.String handle)

Register Packet to the Network

Parameters:
  `packet` - PacketOut to register
  `handle` - Handle to bind

#### getPacket

    public static PacketIn getPacket(java.lang.String handle)

Grab PacketIn Instance via handle

Parameters:
  `handle` - Handle
Returns:
  PacketIn

#### sendPacket

    public void sendPacket(PacketOut packet)

Send Packet to Client

Parameters:
  `packet` - Packet to send

#### destroy

    public void destroy(boolean reconnect)
                 throws java.io.IOException

Drops All Connections and Stops the SubData Listener

Throws:
  `java.io.IOException`