public class Client
extends java.lang.Object
Constructor and Description |
---|
Client(SubDataServer subdata,
java.net.Socket client)
Network Client
|
Modifier and Type | Method and Description |
---|---|
void |
authorize()
Authorize Connection
|
void |
disconnect()
Disconnects the Client
|
java.net.InetSocketAddress |
getAddress()
Get Remote Address
|
java.net.Socket |
getConnection()
Get Raw Connection
|
ClientHandler |
getHandler()
Gets the Linked Handler
|
boolean |
isAuthorized()
If the connection is authorized
|
boolean |
isClosed()
Get if the connection has been closed
|
void |
sendPacket(PacketOut packet)
Send Packet to Client
|
void |
setHandler(ClientHandler obj)
Sets the Handler
|
public Client(SubDataServer subdata, java.net.Socket client) throws java.io.IOException
subdata
- SubData Direct Serverclient
- Socket to Bindjava.io.IOException
public void authorize()
public void sendPacket(PacketOut packet)
packet
- Packet to sendpublic java.net.Socket getConnection()
public boolean isClosed()
public java.net.InetSocketAddress getAddress()
public boolean isAuthorized()
public ClientHandler getHandler()
public void setHandler(ClientHandler obj)
obj
- Handlerpublic void disconnect() throws java.io.IOException
java.io.IOException