You can do it once when the application start.. and check everytime youwant to use it is still active.. The task client creates a connectionwith the task server via socket so if the connection is interrupted youneed to connect it again. For this you can implement your own mechanismbased on the kind of environment where you are running the application.The emergency service application it's just a demo app that connect itonce and it suppose that the connection is alive forever.