Working implementation

TODO: Better way to send fragmented messages, TLS support