def METHOD_NAME(self):
    if len(self._buf) < 2:
        return
    if self._buf[:2] != b"\x05\x00":
        # Anonymous access denied
        self.error()
        return
    self._buf = self._buf[2:]
    self.state = 2
    getattr(self, 'socks_state_%s' % self.state)()