public void PingResponse(string region, Player respondTo, Player p) { PingResponseComm c = new PingResponseComm(p.fleetName, respondTo.fleetName); string msg = JsonConvert.SerializeObject(c); client.Publish(gametopic + "/" + region, Encoding.ASCII.GetBytes(msg)); }
private void M_PingResponseRecieved(object sender, EventArgs e) { if (lookingForGame) { PingResponseComm c = (PingResponseComm)sender; if (c.responseTo == me.fleetName) { //opponent = new Player(c.fleetName); StartGame(new Player(c.fleetName)); } } }