예제 #1
0
 def __init__(self, host='0.0.0.0', port=8888, auth=None, auth_enable=False):
     self.auth = auth
     self.auth_enable = auth_enable
     self.host = host
     self.port = port
     self.sock = None
     self.commands = []
     self.parser = spp.Parser()
예제 #2
0
 def __init__(self, host='0.0.0.0', port=8888):
     self.host = host
     self.port = port
     self.sock = None
     self.commands = []
     self.parser = spp.Parser()
예제 #3
0
 def connect(self):
     self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
     self.sock.setblocking(1)
     self.sock.connect((self.host, self.port))
     self.parser = spp.Parser()