Answers for "c# socket bind to localhost"

C#
1

c# socket bind to localhost

IPAddress address = Dns.GetHostAddresses("localhost").Where(x => x.AddressFamily == AddressFamily.InterNetwork).First();
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
socket.Bind(new IPEndPoint(address, port));
Posted by: Guest on November-28-2020

Code answers related to "c# socket bind to localhost"

C# Answers by Framework

Browse Popular Code Answers by Language