mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
Implementing IsConnected
This commit is contained in:
parent
bea1363641
commit
ade02105f6
|
|
@ -86,6 +86,15 @@ namespace TLSharp.Core.Network
|
|||
return new TcpMessage(seq, body);
|
||||
}
|
||||
|
||||
public bool IsConnected
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._tcpClient.Connected;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_tcpClient.Connected)
|
||||
|
|
|
|||
|
|
@ -379,6 +379,13 @@ namespace TLSharp.Core
|
|||
_session.Save();
|
||||
}
|
||||
|
||||
public bool IsConnected()
|
||||
{
|
||||
if (this._transport == null)
|
||||
return false;
|
||||
return this._transport.IsConnected;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_transport != null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue