server-connection: Add a sendAndReceive method to wakeup the thread

Untested though.