> In a client/server-architecture I am using Poco's HTTPClient and -Server classes and the StreamCopier for data transfer. Unfortunately the performance is very disappointing -- about 200 KB/sec on the local LAN. Since I have little experience with network programming, I have no glue where to look for optimizations.
> Has anyone made similar experiences or some hints to improve this?
I just tested with a modified Net/download simple, easily get 5MByte/seconds via localhost.
I doubt the bottleneck is from the StreamCopier, what is the CPU load on server and on client? If it is low, it's probably some threading issue. Replace your HTTPClient with a modified download sample that writes the file to a NullOutputStream, measure.
Then replace the HTTPServer with apache and measure again. This should help you to narrow the cause to the server/client side.
Just make sure to use HTTP1.1 and to use keepAlive (though this shouldn't be an issue with one single connection, just when you have lots of connections being established between the same server and client). Also if the file is small (lets say less than 1 MByte), there is an overhead for creating the HTTPConnection.
You are working over 100Mbit LAN, not wireless?
> Thanks in advance!