Add Network
This commit is contained in:
parent
9505d4e887
commit
a00f214911
15 changed files with 782 additions and 5 deletions
|
@ -0,0 +1,33 @@
|
|||
package mrdev023.network.packet;
|
||||
|
||||
import java.net.*;
|
||||
|
||||
import mrdev023.network.common.*;
|
||||
import mrdev023.network.packet.main.*;
|
||||
|
||||
public class ClientConnect implements IPacket{
|
||||
|
||||
public String pseudo;
|
||||
|
||||
public ClientConnect(){}
|
||||
public ClientConnect(String pseudo){this.pseudo = pseudo;}
|
||||
|
||||
public void write(DataBuffer buff) throws Exception {
|
||||
buff.put(pseudo);
|
||||
}
|
||||
|
||||
public void read(DataBuffer buff) throws Exception {
|
||||
this.pseudo = buff.getString();
|
||||
}
|
||||
|
||||
public void manage(Client client, IPacket packet) throws Exception {
|
||||
|
||||
}
|
||||
|
||||
public void manage(Client client, IPacket packet, DatagramSocket server) throws Exception {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Reference in a new issue