public class Client
extends java.lang.Object
Constructor and Description |
---|
Client(SubPlugin plugin,
java.net.Socket client)
Network Client
|
Modifier and Type | Method and Description |
---|---|
void |
authorize()
Authorize Connection
|
protected void |
disconnect()
Disconnects the Client
|
java.net.SocketAddress |
getAddress()
Get Remote Address
|
java.net.Socket |
getConnection()
Get Raw Connection
|
ClientHandler |
getHandler()
Gets the Linked Handler
|
boolean |
isAuthorized()
If the connection is authorized
|
protected void |
loop()
Network Loop
|
void |
sendPacket(PacketOut packet)
Send Packet to Client
|
void |
setHandler(ClientHandler obj)
Sets the Handler
Warning: This method should only be called by ClientHandler methods
|
public Client(SubPlugin plugin, java.net.Socket client)
plugin
- SubPluginclient
- Socket to Bindprotected void loop()
public void authorize()
public void sendPacket(PacketOut packet)
packet
- Packet to sendpublic java.net.Socket getConnection()
public java.net.SocketAddress getAddress()
public boolean isAuthorized()
public ClientHandler getHandler()
public void setHandler(ClientHandler obj)
obj
- HandlerClientHandler
protected void disconnect() throws java.io.IOException
java.io.IOException