Small refactoring.

Signed-off-by: Jiri Hnidek <jiri.hnidek@tul.cz>
* Small refactoring of WebSocket implementation.

Signed-off-by: Jiri Hnidek <jiri.hnidek@tul.cz>