parameters: (self, connection)
docstring: Called when the socket connects
docstring_summary: Called when the socket connects
docstring_tokens: Called when the socket connects
function: def on_connect(self, connection):
          "Called when the socket connects"
          self._sock = connection._sock
          self._buffer = SocketBuffer(self._sock, self.socket_read_size)
          if connection.decode_responses:
              self.encoding = connection.encoding
function_tokens: def on_connect ( self , connection ) : self . _sock = connection . _sock self . _buffer = SocketBuffer ( self . _sock , self . socket_read_size ) if connection . decode_responses : self . encoding = connection . encoding