/// <summary> /// GetData is just a wrapper for BeginReceive. /// This is the public entry point for asking for data. /// Necessary so that we can separate networking concerns from client concerns. /// </summary> /// <param name="state"></param> public static void GetData(SocketState state) { state.theSocket.BeginReceive(state.messageBuffer, 0, state.messageBuffer.Length, SocketFlags.None, ReceiveCallback, state); }
/// <summary> /// Requests more data from the server/client assigned to the socket state object. /// </summary> /// <param name="state"></param> public static void GetData(SocketState state) { // Continue the "event loop" that was started on line 96. // Start listening for more parts of a message, or more new messages state.theSocket.BeginReceive(state.messageBuffer, 0, state.messageBuffer.Length, SocketFlags.None, ReceiveCallback, state); }
public void FirstContact(SocketState ss) { ss.CallMe = ReceiveSpreadsheets; Network.GetData(ss); }
/// <summary> /// Placeholder socket state /// </summary> /// <param name="ss">socket state</param> public void placeHolder(SocketState ss) { }