Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReadCallback()

static void System.Net.CommandStream.ReadCallback ( IAsyncResult asyncResult)
inlinestaticprivateinherited

Definition at line 362 of file CommandStream.cs.

363 {
364 ReceiveState receiveState = (ReceiveState)asyncResult.AsyncState;
365 try
366 {
367 Stream connection = receiveState.Connection;
368 int num = 0;
369 try
370 {
371 num = connection.EndRead(asyncResult);
372 if (num == 0)
373 {
374 receiveState.Connection.CloseSocket();
375 }
376 }
377 catch (IOException)
378 {
379 receiveState.Connection.MarkAsRecoverableFailure();
380 throw;
381 }
382 catch
383 {
384 throw;
385 }
386 receiveState.Connection.ReceiveCommandResponseCallback(receiveState, num);
387 }
388 catch (Exception e)
389 {
390 receiveState.Connection.Abort(e);
391 }
392 }
virtual int EndRead(IAsyncResult asyncResult)
Definition Stream.cs:737

References System.Net.CommandStream.Abort(), System.asyncResult, System.Net.NetworkStreamWrapper.CloseSocket(), System.Net.ReceiveState.Connection, System.IO.Stream.EndRead(), System.Net.CommandStream.MarkAsRecoverableFailure(), and System.Net.CommandStream.ReceiveCommandResponseCallback().