public void Send(Packet packet) { var packetStr = Packet.WriteToMessage(packet); Send(packetStr); }
public static string WriteToMessage(Packet packet) { return JsonConvert.SerializeObject(packet); }