mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
Modified TcpClient setup to work with IPv6 addresses, fixing #773.
This commit is contained in:
parent
6ce4eceaca
commit
3224113e4c
|
|
@ -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