Assets/MotionFramework/Scripts/Runtime/Engine/Engine.Network/Socket/TCP/TcpChannel.cs
/// <summary>
/// This method is called whenever a receive or send operation is completed on a socket 
/// </summary>
This method is called whenever a receive or send operation is completed on a socket
This method is called whenever a receive or send operation is completed on a socket
private void IO_Completed(object sender, SocketAsyncEventArgs e)
		{
			switch (e.LastOperation)
			{
				case SocketAsyncOperation.Receive:
					MainThreadSyncContext.Instance.Post(ProcessReceive, e);
					break;
				case SocketAsyncOperation.Send:
					MainThreadSyncContext.Instance.Post(ProcessSend, e);
					break;
				default:
					throw new ArgumentException("The last operation completed on the socket was not a receive or send");
			}
		}
private void IO_Completed ( object sender , SocketAsyncEventArgs e ) { switch ( e . LastOperation ) { case SocketAsyncOperation . Receive : MainThreadSyncContext . Instance . Post ( ProcessReceive , e ) ; break ; case SocketAsyncOperation . Send : MainThreadSyncContext . Instance . Post ( ProcessSend , e ) ; break ; default : throw new ArgumentException ( " " ) ; } }
This method is called whenever a receive or send operation is completed on a socket
This method is called whenever a receive or send operation is completed on a socket
// determine which type of operation just completed and call the associated handler
sender
object
e
SocketAsyncEventArgs