Make client send stuff
This commit is contained in:
parent
2c49aaf4ce
commit
2e1f3e1c16
@ -10,14 +10,10 @@ namespace Network {
|
|||||||
|
|
||||||
private Connection ServerConn;
|
private Connection ServerConn;
|
||||||
|
|
||||||
private PacketBuffer TempBuffer;
|
|
||||||
|
|
||||||
private float Timer = 0;
|
private float Timer = 0;
|
||||||
|
|
||||||
public Client(PacketPeerUDP packetPeer) : base(packetPeer, false) {
|
public Client(PacketPeerUDP packetPeer) : base(packetPeer, false) {
|
||||||
PacketPeer = packetPeer;
|
PacketPeer = packetPeer;
|
||||||
TempBuffer = PacketBuffer.WithSignature();
|
|
||||||
TempBuffer.Write(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Initialize(string address, int port) {
|
public override void Initialize(string address, int port) {
|
||||||
@ -40,6 +36,7 @@ namespace Network {
|
|||||||
|
|
||||||
public override void Connected(Connection conn) {
|
public override void Connected(Connection conn) {
|
||||||
GD.print("Connected to " + conn.Name + " at " + conn.Address + ":" + conn.Port);
|
GD.print("Connected to " + conn.Name + " at " + conn.Address + ":" + conn.Port);
|
||||||
|
PacketDistributor.AddHandler(ServerConn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user