I am trying to use C# to connect over a ssl socket to a server and send xml data back and forth. It seems that data won't be sent till it has reached a certain packet size 1000 bytes, upon which all the packets are just smashed on top of each other. Is there a way to force ssl library to send out packets as I send them?
I am using SslStream and StreamWriter to send the data, and i have already tried making packet size smaller and setting NoDelay to true to no avail. Is there just something I am missing?
sslStream = new SslStream(sslClient.GetStream(), false, new RemoteCertificateValidationCallback(CertificateValidationCallback));
sslStream.AuthenticateAsClient(appSettings.CBPASServer);
showSslInfo(appSettings.CBPASServer, sslStream, true);
streamWriter = new StreamWriter(sslStream);
...
sslStream.Write(xml);
sslStream.Flush();