public void Send(PacketBase packet) { MethodInfo methodToInvok; try { if (this != null) { _client.Send(packet.Pack()); } if (message.Manager.MethodHandlers.TryGetValue((ushort)packet.packetOp, out methodToInvok)) { //console.cw(console.type.Send, "Sent {0}{1} to '{1}:{2}'", methodToInvok.Name, methodToInvok.GetParameters(), _client.ip, _client.prt); } else { //console.cw(console.type.Send, "Unknow packet '{0}' sent to '{1}:{2}'", Functions.ByteArrayToString(packet.Pack()), _client.ip, _client.prt); } } catch (Exception ex) { Log.WriteLog(Log.Type.Error, ex.ToString()); } }
public void Send(PacketBase packet) { try { if (this != null) { _client.Send(packet.Pack()); } } catch (Exception ex) { Log.WriteLog(Log.Type.Error, ex.ToString()); } }
public void Send(PacketBase packet) { try { //console.cw(console.type.Send, "Unknow packet '{0}' sent to '{1}:{2}'", Functions.ByteArrayToString(packet.Pack()), _client.ip, _client.prt); if (this != null) { _client.Send(packet.Pack()); } } catch (Exception ex) { Log.WriteLog(Log.Type.Error, ex.ToString()); } }