|
|
@@ -68,6 +68,7 @@ namespace Shadowsocks.Net |
|
|
|
// Create a TCP/IP socket. |
|
|
|
_tcpSocket = new Socket(_localEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp); |
|
|
|
_tcpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); |
|
|
|
_tcpSocket.SetSocketOption(SocketOptionLevel.IPv6, SocketOptionName.IPv6Only, false); |
|
|
|
|
|
|
|
// Bind the socket to the local endpoint and listen for incoming connections. |
|
|
|
_tcpSocket.Bind(_localEndPoint); |
|
|
|