Tag: networkcomms.net

Networkcomms.net库发送自定义类

几天前我开始在C#中使用这个库 。 当我遇到错误时,我试图发送自定义类,这是我的代码: Main.cs private void button3_Click(object sender, EventArgs e) { listBox1.Items.Add(“Sending message to server saying ‘” + textBox2.Text + “‘”); TCPConnection connection = TCPConnection.GetConnection(new ConnectionInfo(serverIP, serverPort)); SendReceiveOptions options = connection.ConnectionDefaultSendReceiveOptions.Clone() as SendReceiveOptions; options.DataProcessors.Add(DPSManager.GetDataProcessor()); RijndaelPSKEncrypter.AddPasswordToOptions(options.Options, “Your strong PSK”); if (connection.SendReceiveObject(“Payload”, “Ack”, 1000, new PayloadFile(textBox2.Text)) != null) // <– Giving an exception here, "Type is not […]