A convenience websocket API handling concurrent-safe reads, writes, and other lifetime events.