예제 #1
0
 /// <summary>
 /// A simple method used as a callback for network testing purposes.
 /// </summary>
 /// <param name="state"></param>
 private void MockCallbackMethod(SocketState state)
 {
     Console.WriteLine("This was called.");
 }
 /// <summary>
 /// This is a helper function that the client View code will call whenever it wants more data.
 /// </summary>
 /// <param name="state"></param>
 public static void GetData(SocketState state)
 {
     // Begin receiving data from the remote host.
     state.Socket.BeginReceive(state.Buffer, 0, state.Buffer.Length, SocketFlags.None, ReceiveCallback, state);
 }