mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-06 15:05:54 +00:00
Implementing IsConnected
This commit is contained in:
parent
1697db9d7f
commit
1abbb01d74
2 changed files with 20 additions and 4 deletions
|
|
@ -86,6 +86,15 @@ namespace TLSharp.Core.Network
|
||||||
return new TcpMessage(seq, body);
|
return new TcpMessage(seq, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsConnected
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._tcpClient.Connected;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
if (_tcpClient.Connected)
|
if (_tcpClient.Connected)
|
||||||
|
|
|
||||||
|
|
@ -379,6 +379,13 @@ namespace TLSharp.Core
|
||||||
_session.Save();
|
_session.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsConnected()
|
||||||
|
{
|
||||||
|
if (this._transport == null)
|
||||||
|
return false;
|
||||||
|
return this._transport.IsConnected;
|
||||||
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
if (_transport != null)
|
if (_transport != null)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue