code: def socket(self):
          
          if self._ssl:
              if self._useSecuredWebsocket:
                  return self._ssl.getSSLSocket()
              else:
                  return self._ssl
          else:
              return self._sock
docs: Return the socket or ssl object for this client.