You can use the echo. Send a message like <message
to='server/echo'><body>Echo</body></message>
That's sort of a heavyweight way to do it. When I asked the same question last week, the most elegant solution was to simply send a newline to the server. If no TCP acknowlegement is received, your network stack will tell you that the connection has closed.
Alternatively you can enable TCP keepalive mode on your socket, but setting the time interval below the default 2 hours is a relatively new feature and may not be supported on your system.
�Jens
