mirror of
https://github.com/sochix/TLSharp.git
synced 2026-01-11 03:09:58 +01:00
Modified TcpClient setup to work with IPv6 addresses, fixing #773.
This commit is contained in:
parent
d6d2553c0f
commit
4ea9879f0e
|
|
@ -16,10 +16,11 @@ namespace TLSharp.Core.Network
|
|||
{
|
||||
if (handler == null)
|
||||
{
|
||||
_tcpClient = new TcpClient();
|
||||
|
||||
var ipAddress = IPAddress.Parse(address);
|
||||
_tcpClient.Connect(ipAddress, port);
|
||||
var endpoint = new IPEndPoint(ipAddress, port);
|
||||
|
||||
_tcpClient = new TcpClient(endpoint);
|
||||
_tcpClient.Connect(endpoint);
|
||||
}
|
||||
else
|
||||
_tcpClient = handler(address, port);
|
||||
|
|
|
|||
Loading…
Reference in a new issue