On 24 Feb 2012, at 14:28, Tudor Girba wrote: > Thanks, but I did not explain my problem correctly. My problem is > actually super trivial. I have a server that throws continuously plain > text (actually, it's a logging facility), and I need to implement a > client that connects to it and consumes the plain text endlessly > without any feedback to the server. So, essentially, there is no > communication protocol involved.
OK, but it is still not 100% clear: who is the client and who is the server ? A web server (Apache, Seaside, ZnServer) is a long running program that accepts connections from clients (web browsers, curl, ZnClient), interprets the requests and sends responses as replies; the initiaitive lies with the client. Such a server might generate a logging stream which is usually written to a file, but it could send the logging records to a logging server (like syslogd) that collects and/or processes them. Then the server becomes a client to the logging server, the initiative for the communication lies with the server-as-logging-client. The reverse also exists: you could connect to a server (Twitter) and ask for a specific data stream to be send to you. Then the server is like a notification/messaging/queueing system (some multithreading magic will be needed). The connection initiative lies with the client, but the data stream transfer is done on the server's initiative. Sven
