/// <summary> /// Input button for sending messages to the server from the network text box /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void InputEnterButton_Click(object sender, EventArgs e) { // Send the filename to the server that the user requests if (networkInputTextbox.Text.Length > 1) { networkInfoTextBox1.Text = networkInfoTextBox1.Text + "\n" + networkInputTextbox.Text; StaticNetworking.Send(spreadsheetState.Socket, networkInputTextbox.Text + "\n"); } }
// SERVER CONNECTION WORK BEGINS HERE /// <summary> /// Initial handshake with the server /// </summary> /// <param name="state"></param> public void FirstContact(SocketState state) { state.callMe = ReceiveStartup; StaticNetworking.Send(state.Socket, UsernameTextBox.Text + "\n"); }