Exemple #1
0
def get_ip(ip, port):
  ip_sock = socketutil.client_socket()
  ip_sock.connect((ip, port))
  ip_sock.send('PING')
  my_ip = ip_sock.recv(1024)
  ip_sock.close()
  return str(my_ip)
Exemple #2
0
 def connect(self):
   self.__socket = socketutil.client_socket()
   self.__socket.connect((self.__address, self.__port) )