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 (does not remove them from the server)
|
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
|
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 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