Add ability to both read/write messages for websocket testing.