On ira tester mnt avec Hugo en tant que serveur pour regarder les packets qui arrivent via WireShark
continuous-integration/drone/push Build is failing Details

ServerDeployement
Bruno DA COSTA CUNHA 2 years ago
parent 092822705f
commit e31c68d90b

@ -114,9 +114,7 @@ public class PongServer
UdpClient clientSocket = new UdpClient(clientEndPoint);
room.playerJoin = new KeyValuePair<Player, UdpClient>(data.Data, clientSocket);
room.NbPlayer++;
Console.WriteLine("New connection Client from " + remoteEndPoint.ToString());
@ -125,6 +123,7 @@ public class PongServer
serverSocket.Send(connectionData, connectionData.Length, remoteEndPoint);
room.PropertyChanged += room.OnReadyChanged;
room.NbPlayer++;
}

@ -82,12 +82,12 @@ namespace Server
if (maxPlayer == 2)
{
IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 0);
IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 3133);
byte[] receivedDataHost = playerHost.Value.Receive(ref remoteEndPoint);
playerJoin.Value.Send(receivedDataHost, receivedDataHost.Length, remoteEndPoint);
byte[] receivedDataJoin = playerJoin.Value.Receive(ref remoteEndPoint);
playerJoin.Value.Send(receivedDataHost, receivedDataHost.Length, remoteEndPoint);
playerHost.Value.Send(receivedDataJoin, receivedDataJoin.Length, remoteEndPoint);
Thread receiveThread1 = new Thread(() => ReceiveMessages(playerHost.Value, playerJoin.Value));

@ -11,10 +11,5 @@ namespace Shared.DTO
public Informations Informations { get; set; }
public T Data { get; set; }
public ObjectTransfert(Informations infos, T data)
{
Informations = infos;
Data = data;
}
}
}

Loading…
Cancel
Save