public static void SendUDPData(IPEndPoint _clientEndPoint, Packet _packet) { try { if (_clientEndPoint != null) { udpListener.BeginSend(_packet.ToArray(), _packet.Length(), _clientEndPoint, null, null); } } catch (Exception _ex) { Console.WriteLine($"Error sending data to {_clientEndPoint} via UDP: {_ex}"); } }
public void SendData(GameServer.Packet _packet) { try { if (socket != null) { stream.BeginWrite(_packet.ToArray(), 0, _packet.Length(), null, null); } } catch (Exception _ex) { Debug.Log($"Error sending data to server via TCP: {_ex}"); } }
public void SendData(Packet _packet) { try { if (socket != null) { stream.BeginWrite(_packet.ToArray(), 0, _packet.Length(), null, null); } } catch (Exception _ex) { Console.WriteLine($"Error sending data to player {id} via TCP: {_ex}"); } }
public void SendData(Packet packet) { try { if (socket != null) { stream.BeginWrite(packet.ToArray(), 0, packet.Length(), null, null); } } catch (Exception ex) { Debug.Log($"Error sending data to player {id} via TCP: {ex}"); } }
public static void SendUDPPacket(IPEndPoint clientIPEndPoint, Packet packet) { try { if (clientIPEndPoint != null) { UDPClient.BeginSend(packet.ToArray(), packet.Length(), clientIPEndPoint, null, null); } } catch (Exception exception) { Console.WriteLine($"Error, sending data to Client from Server: {clientIPEndPoint} via UDP.\nException {exception}"); } }
public void SendData(Packet _packet) { try { if (socket == null) { return; } stream.BeginWrite(_packet.ToArray(), 0, _packet.Length(), null, null); } catch (Exception _ex) { Console.WriteLine($"Error sendings data to client {id} via TCP: {_ex}"); } }
public void SendPacket(Packet packet) { try { if (Socket != null) { Stream.BeginWrite(packet.ToArray(), 0, packet.Length(), null, null); } } catch (Exception exception) { Console.WriteLine($"\n\tError, occured when sending TCP data to client {ID}\nError{exception}"); Server.ClientDictionary[ID].Disconnect(); } }
public static void SendUDPData(IPEndPoint _clientEndPoint, Packet _packet) { try { if (_clientEndPoint != null) { udpListener.BeginSend(_packet.ToArray(), _packet.Length(), _clientEndPoint, null, null); } } catch (Exception e) { Console.WriteLine($"发送UDP data失败:{e}"); throw; } }
public void SendData(Packet _packet) { try { if (socket != null) { stream.BeginWrite(_packet.ToArray(), 0, _packet.Length(), null, null); } } catch (Exception e) { Console.WriteLine($"发送数据错误,id:{id},{e}"); throw; } }
public static void SendUDPData(IPEndPoint _clientEndPoint, Packet packet) { try { //Debug.Log($"Sending UDP data to {_clientEndPoint}"); if (_clientEndPoint != null) { udpListener.BeginSend(packet.ToArray(), packet.Length(), _clientEndPoint, null, null); } } catch (Exception ex) { Debug.Log($"Error Sending UDP data to {_clientEndPoint} via UDP: {ex}"); } }
public void SendData(Packet packet) { try { if (Socket != null) { _stream.BeginWrite(packet.ToArray(), 0, packet.Length(), null, null); } } catch (Exception e) { Console.WriteLine($"Error Sending Data To Player {_id} via TCP:"); Console.WriteLine(e); } }
public static void SendUDPData(IPEndPoint _clientEndPoint, Packet _packet) { try { if (_clientEndPoint != null) { udpListener.BeginSend(_packet.ToArray(), _packet.Length(), _clientEndPoint, null, null); } } catch (Exception _ex) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine($"Erro ao enviar data para {_clientEndPoint} via UDP: {_ex}"); Console.ForegroundColor = ConsoleColor.White; } }
public void SendData(Packet _packet) { try { if (socket != null) { stream.BeginWrite(_packet.ToArray(), 0, _packet.Length(), null, null); } } catch (Exception _ex) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine($"Erro ao enviar data para o Player {id} via TCP: {_ex}"); Console.ForegroundColor = ConsoleColor.White; } }
public static void SendUDPData(IPEndPoint _clientEndPoint, Packet _packet) { try { if (_clientEndPoint != null) { udpListener.BeginSend(_packet.ToArray(), _packet.Length(), _clientEndPoint, null, null); } else { // int packEnum = _packet.ReadInt(false); // Console.WriteLine($"Error: ClientEndPoint was null on attempted UDP send of packet: {(ServerPackets) packEnum}"); } } catch (Exception _ex) { Console.WriteLine($"Error sending data to {_clientEndPoint} via UDP: {_ex}"); } }
public void SendData(Packet packet) { try { if (socket != null) { stream.BeginWrite(packet.ToArray(), 0, packet.Length(), null, null); sentPackages++; } } catch (Exception e) { if (e is System.IO.IOException) { Console.WriteLine("Player with id: " + id + " lost connection."); } Console.WriteLine($"Error sending Data to Player {id} via TCP: {e}."); } }
public void SendPacket(Packet packet) { try { if (Socket == null) { Console.WriteLine("" + "\n*************************************" + "\nSocket is null" + "\n*************************************"); } if (Stream == null) { Console.WriteLine("" + "\n*************************************" + "\nStream is null" + "\n*************************************"); } if (packet == null) { Console.WriteLine("" + "\n*************************************" + "\nPacket is null" + "\n*************************************"); } if (Socket != null) { Stream.BeginWrite(packet.ToArray(), 0, packet.Length(), null, null); } } catch (Exception exception) { Console.WriteLine($"\n\t\tGameServer: {ServerName} error, sending data to MainServerComms: {Port}\nException {exception}"); } }