This commit is contained in:
Salar Khalilzadeh 2017-04-23 17:09:18 +00:00 committed by GitHub
commit caf2c9ff93
2 changed files with 20 additions and 4 deletions

View file

@ -84,8 +84,17 @@ namespace TLSharp.Core.Network
}
return new TcpMessage(seq, body);
}
}
public bool IsConnected
{
get
{
return this._tcpClient.Connected;
}
}
public void Dispose()
{
if (_tcpClient.Connected)

View file

@ -377,8 +377,15 @@ namespace TLSharp.Core
_session.SessionExpires = int.MaxValue;
_session.Save();
}
}
public bool IsConnected()
{
if (this._transport == null)
return false;
return this._transport.IsConnected;
}
public void Dispose()
{
if (_transport != null)