Add SSL support
Modify message sending structure