Moderator: igrr
The original piece of code I provided was a Client sending HTTP request to a Server.
HTTP requests are usually a bit slow because of their nature.
If you wish to get faster exchange, it is better to use plain TCP connection and define you own command protocol.
Of course, this will require more software design, but there are plenty of advantage, such as the communication can stay connected, like a telnet, and throughput of data is higher.
Simply look at this thread which also point out to some other where the codes were provided.
viewtopic.php?f=6&t=4806&p=27501&hilit=MyAPServer#p27501