private void Server_onReceiveData(NetTcpServer sender, NetTcpClient client, CommandResult data) { Invoke((Action) delegate { listBox1.Items.Insert(0, "S - Receive data" + data.message); }); client.write("Response "); }
/// <summary> /// Write data /// </summary> /// <param name="data"></param> public void write(string data) { try { tcpClient.write(data, Encoding.UTF8); } catch (Exception ex) { //writeThread.Abort(); } }
/// <summary> /// Write data /// </summary> /// <param name="data"></param> public void write(string data) { tcpClient.write(data, Encoding.UTF8); }
private void button6_Click(object sender, EventArgs e) { client.write("Hello"); }