📅  最后修改于: 2022-03-11 14:49:14.594000             🧑  作者: Mango
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IPAddress address = Dns.GetHostAddresses(ip)[0];
socket.Bind(new IPEndPoint(address, port));