fun receive(): ByteArray
returns an empty array if the websocket is closed and the remote shell should terminate.