[Modify] Polish it
This commit is contained in:
parent
8c62e9acb2
commit
9775d93817
@ -193,6 +193,13 @@ namespace Example1
|
|||||||
_websocket.Send (createTextMessage ("heartbeat", String.Empty));
|
_websocket.Send (createTextMessage ("heartbeat", String.Empty));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Close ()
|
||||||
|
{
|
||||||
|
Disconnect ();
|
||||||
|
_timer.Dispose ();
|
||||||
|
_notifier.Close ();
|
||||||
|
}
|
||||||
|
|
||||||
public void Connect (string username)
|
public void Connect (string username)
|
||||||
{
|
{
|
||||||
_name = username;
|
_name = username;
|
||||||
@ -215,9 +222,7 @@ namespace Example1
|
|||||||
|
|
||||||
void IDisposable.Dispose ()
|
void IDisposable.Dispose ()
|
||||||
{
|
{
|
||||||
Disconnect ();
|
Close ();
|
||||||
_timer.Dispose ();
|
|
||||||
_notifier.Close ();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user