internal string Receive() { byte[] bytes; while (true) { try { bytes = receiver.Receive(ref blankEP); break; } catch (SocketException e) { } } return(Encoding.ASCII.GetString(HammingEncoder.DecodeBits(bytes))); }
internal void Send(string message) { byte[] messageBytes = HammingEncoder.EncodeBits(Encoding.ASCII.GetBytes(message)); sender.Send(messageBytes, messageBytes.Length); }
internal string Receive(ref IPEndPoint tempEP) { return(Encoding.ASCII.GetString(HammingEncoder.DecodeBits(receiver.Receive(ref tempEP)))); }