add abstract layer for websockets. issue #51