public void Bind(IPEndPoint EndPoint) { if (EndPoint.AddressFamily == AddressFamily.InterNetwork) { EndPoint.Address = SocketUtilities.MapIPv4ToIPv6(EndPoint.Address); } LocalEndPoint = EndPoint; Socket.Bind(EndPoint); }
public void Connect(IPEndPoint EndPoint) { if (EndPoint.AddressFamily == AddressFamily.InterNetwork) { EndPoint.Address = SocketUtilities.MapIPv4ToIPv6(EndPoint.Address); } RemoteEndPoint = EndPoint; ConnectInternal(EndPoint); }