private static void Print() { MOD.log.LogMessage(MOD.Serialize(new EndPlayerStatsEventArgs() { Meetings = Meeting.Meetings, Murders = Models.Murder.Murders, EndPlayerStats = PlayerStats.Stats.Values.ToList(), })); }
private static void SendAsync(object sender, EventArgs e) { MOD.log.LogMessage(MOD.Serialize(e)); if (Instance == null || !Instance.socket.Connected) { return; } Instance.socket.EmitAsync(e.getName(), MOD.Serialize(e)); }
public override void OnWsConnecting(HttpRequest request) { request.SetBegin("GET", "/"); request.SetHeader("Host", "localhost"); request.SetHeader("Origin", "http://localhost"); request.SetHeader("Upgrade", "websocket"); request.SetHeader("Connection", "Upgrade"); request.SetHeader("Sec-WebSocket-Key", Convert.ToBase64String(WsNonce)); request.SetHeader("Sec-WebSocket-Protocol", "among, voip"); request.SetHeader("Sec-WebSocket-Version", "13"); request.SetHeader("Room", MOD.Serialize(ConnectEventArgs)); }