def makeSocket(self):
    try:
        self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    except socket.error as msg:
        self.sock = None
    try:
        self.sock.connect(SERVER)
        time.sleep(0.1)
    except socket.error as msg:
        self.sock.close()
        self.sock = None
    if (self.sock is None):
        print('could not open socket, try again')
        return
    self.sock.setblocking(0)
def makeSocket(self):
    try:
        self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    except socket.error as msg:
        self.sock = None
    try:
        self.sock.connect(SERVER)
        time.sleep(0.1)
    except socket.error as msg:
        self.sock.close()
        self.sock = None
    if (self.sock is None):
        print('could not open socket, try again')
        return
    self.sock.setblocking(0)