mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 21:25:52 +12:00
Update HISP
This commit is contained in:
parent
d73cd92c52
commit
29e5ab8093
8 changed files with 31 additions and 23 deletions
|
@ -36,15 +36,20 @@ namespace HISP.Server.Network
|
|||
}
|
||||
internal virtual void receivePackets(object sender, SocketAsyncEventArgs e)
|
||||
{
|
||||
do
|
||||
try
|
||||
{
|
||||
if (!checkForError(e))
|
||||
do
|
||||
{
|
||||
if (checkForError(e)) break;
|
||||
ProcessReceivedPackets(e.BytesTransferred, e.Buffer);
|
||||
else
|
||||
break;
|
||||
if (checkForError(e)) break;
|
||||
|
||||
|
||||
} while (!socket.ReceiveAsync(e));
|
||||
} while (!socket.ReceiveAsync(e));
|
||||
}
|
||||
catch (Exception ex) {
|
||||
Logger.ErrorPrint(ex.StackTrace);
|
||||
try { this.Disconnect(); } catch (Exception) { };
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
@ -102,8 +107,8 @@ namespace HISP.Server.Network
|
|||
socket = null;
|
||||
|
||||
}
|
||||
catch (SocketException e) { }
|
||||
catch (ObjectDisposedException e) { };
|
||||
catch (SocketException) { }
|
||||
catch (ObjectDisposedException) { };
|
||||
}
|
||||
|
||||
onDisconnectCallback();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue