public static void AnswerResponse(TcpClients client, Choice playerChoice, int TimeToAnswer) { SocketHelper.WriteToServer(client, Encapsulation.Serialize(Encapsulation.FromValue(new Answer { GameId = GameInfo.UniqueId, RoundId = GameInfo.RoundGuid, TimeToAnswer = TimeToAnswer, playerChoice = playerChoice }, MessageType.Answer))); }
public static void DiscoverResponse(TcpClients client) { SocketHelper.WriteToServer(client, Encapsulation.Serialize(Encapsulation.FromValue(new Discover { UserName = Environment.UserName }, MessageType.Discover))); }
public static void SearchingResponse(TcpClients client) { SocketHelper.WriteToServer(client, Encapsulation.Serialize(Encapsulation.FromValue(new GenericMessage { Message = "Looking for a game" }, MessageType.Searching))); }
public static void DisconnectMessage(TcpClients client) { SocketHelper.WriteToServer(client, Encapsulation.Serialize(Encapsulation.FromValue(new GenericMessage { Message = "Disconnect" }, MessageType.Disconnect))); }