Add  callback for socket_closed
Push handshake validation into wsc_lib completely
Remove unused callback return value
Move onconnect callback invokation to the appropriate place