Allow external remote address get
This commit is contained in:
1 parent
486b53b402
commit
41805d7de9
1 file changed
+4
-3
@@ -82,9 +82,11 @@ namespace Mistox.Server {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose() {
|
public IPAddress getRemote() {
|
||||||
if (!Connected) return;
|
return _remoteAddress.Address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose() {
|
||||||
Connected = false;
|
Connected = false;
|
||||||
_cts.Cancel();
|
_cts.Cancel();
|
||||||
_client.Close();
|
_client.Close();
|
||||||
@@ -93,7 +95,6 @@ namespace Mistox.Server {
|
|||||||
|
|
||||||
_parent.Connections.TryRemove(UserName, out _);
|
_parent.Connections.TryRemove(UserName, out _);
|
||||||
_parent.InvokeUserDisconnected(this);
|
_parent.InvokeUserDisconnected(this);
|
||||||
_parent.Alive = false;
|
|
||||||
// Remove this item from the Dictionary on the Server for garbage collection
|
// Remove this item from the Dictionary on the Server for garbage collection
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user