/// <summary> /// Receive the updates to the state from the server and process updates. /// </summary> /// <param name="state"></param> public void ReceiveSpreadsheetUpdates(SocketState state) { state.callMe = ReceiveSpreadsheetUpdates; StaticNetworking.GetData(state); // Retrieve string message from state //string[] s = state.SB.ToString().Split('\n'); //Byte[] b = state.MessageBuffer; // Lock the spreadsheet while data processes // Process data // Clear the stringbuilder for the next round of messages from the server }
/// <summary> /// Receive the startup information from the server and process. /// </summary> /// <param name="state"></param> public void ReceiveStartup(SocketState state) { state.callMe = ReceiveInitialSpreadsheet; StaticNetworking.GetData(state); spreadsheetState = state; // Retrieve string message from state Byte[] b = state.MessageBuffer; string[] s = state.SB.ToString().Split('\t'); // Lock the spreadsheet while data processes lock (spreadsheetState) { // Process startup data for requesting file from server openOrCreateFile(b, s); } // Clear the stringbuilder for the next round of messages from the server state.SB.Clear(); }