bugfix: correct messages order

+ send 'connect' command before any other so messages order is always valid
+ make write buffer member cause boost asio doesn't copy buffers