Home › Forums › Support › Sent Confirmation › Reply To: Sent Confirmation
I found the problem.
Im using encryption, if i turn that off then it works fine.
I would have expected it to work with the encryption on though. A bug or maybe Im doing it wrong?
This is my code with encryption :-
// setup
NetworkComms.EnableLogging();
Serializer = DPSManager.GetDataSerializer<NetworkCommsDotNet.DPSBase.ProtobufSerializer>();
NetworkComms.DefaultSendReceiveOptions = new SendReceiveOptions(Serializer, NetworkComms.DefaultSendReceiveOptions.DataProcessors, NetworkComms.DefaultSendReceiveOptions.Options); RijndaelPSKEncrypter.AddPasswordToOptions(NetworkComms.DefaultSendReceiveOptions.Options, _encryptionKey);
NetworkComms.AppendGlobalIncomingPacketHandler<Chat> (MESSAGE_CHAT, HandleChatMessage);
Connection.StartListening (ConnectionType.TCP, new IPEndPoint (IPAddress.Any, TCP_PORT_CHAT));
// send a message
ConnectionInfo serverConnectionInfo = null;
Chat m = new Chat ();
m.Guid = guid;
m.Text = text;
//We will modify these options and then use them in future sends
SendReceiveOptions options = NetworkComms.DefaultSendReceiveOptions.Clone() as SendReceiveOptions;
//Add the encryptor to the list of DataProcessors to use when sending data with these options options.DataProcessors.Add(NetworkCommsDotNet.DPSBase.DPSManager.GetDataProcessor<NetworkCommsDotNet.DPSBase.RijndaelPSKEncrypter>());
//Add the password to the options
NetworkCommsDotNet.DPSBase.RijndaelPSKEncrypter.AddPasswordToOptions(options.Options, _encryptionKey);
options.ReceiveConfirmationRequired = true;
serverConnectionInfo = new ConnectionInfo(serverIPAddress, TCP_PORT_CHAT);
TCPConnection.GetConnection(serverConnectionInfo).SendObject<Chat>(MESSAGE_CHAT, m, options);