Hi all,
I had a similar problem with short messages taking a while to get sent for HTTP requests done using sockets rather than the baked in System.http functionality.....
After some digging I think the TCP socket was buffering (Nagle algorithm send coalescing) the send.
http://msdn.microsof....socket.nodelay
See http://blog.devmobil...uest-reduction/for a bit more detail.
EndPoint Destination = new IPEndPoint(address.AddressList[0], (int)this._Port);
// Connects to the socket
this._Sock.Connect(Destination);
this._Sock.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, true);
I did a quick global search thru the M2Mqtt library an couldn't see the Nagle functionality being turned off...
It might be worth trying this?
Bryn
blog.devmobile.co.nz