[lib] initial draft to websockets passes