ludent
extract create_sock function
remove empty lines
rename on_connect -> on_open
use web socket if config.url is specified

The Lua Peer still uses the custom protocol per default, since it is
slightly more efficient than websockets. The interface remains backward
compatible