'Initialize the Session. This should be called by the protocol when
a new session is established.
Args:
protocol_key (str): By default, one of \'telnet\', \'ssh\',
\'ssl\' or \'web\'.
address (str): Client address.
sessionhandler (SessionHandler): Reference to the
main sessionhandler instance.'

def init_session(self, protocol_key, address, sessionhandler):

    self.protocol_key = protocol_key
    self.address = address
    self.suid = None
    self.sessid = 0
    self.csessid = None
    self.uid = None
    self.uname = None
    self.logged_in = False
    self.puid = None
    self.conn_time = time.time()
    self.cmd_last_visible = self.conn_time
    self.cmd_last = self.conn_time
    self.cmd_total = 0
    self.protocol_flags = {'ENCODING': 'utf-8', 'SCREENREADER': False, 'INPUTDEBUG': False, 'RAW': False, 'NOCOLOR': False}
    self.server_data = {}
    self.datamap = {}
    self.sessionhandler = sessionhandler
