hi all, as you know, the support for tcp sockets was added recently to the SEC code which allows for integrations with applications capable of receiving data over TCP connections (like Graphite and various syslog servers). The current implementation of 'tcpsock' action is fairly basic and only sends data to remote peer, ignoring any data that might be possibly sent from server to client. For this reason, the current implementation is not able to immediately detect situations where remote server closes the connection gracefully with the FIN packet. The fact that the connection has been closed can be detected by successful read from the socket which returns 0 bytes (similar to EOF condition when reading from pipes). If the server is not sending any data to SEC but only expecting to receive data, things are easy -- there is no data available in the socket for reading, and when the appearance of new data is finally reported, reading from the socket will yield 0 bytes. However, if the server is sending back a lot of data, handling this might become somewhat complex -- in order to see EOF, all previously sent bytes must be read. It is not hard to periodically run a while(1) loop with calls to read() until no more data is available for reading, but if the server issues a massive byte stream, SEC could stay in the reading loop for more than few cycles. Do you see this as a problem? Normally, one would only configure SEC to work with servers which behave in a known/predictable way and never send huge amounts of data back, but no implementation is free of bugs. There are also other ways of tackling this problem -- for example, if any data is returned from server (be it EOF or real bytes), simply close the TCP socket, and let the next 'tcpsock' action to recreate it again. What kind of implementation would you like to have? kind regards, risto
------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr _______________________________________________ Simple-evcorr-users mailing list Simple-evcorr-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users