Esempio n. 1
0
 def name(self):
     """Return the server socket’s address (host, port)."""
     return ip.addrToString(self.localAddress()), self.localPort()
Esempio n. 2
0
 def peerName(self):
     return ip.addrToString(self.peerAddress()), self.peerPort()
Esempio n. 3
0
 def receiveFrom(self):
     size = self.pendingDatagramSize()
     if size>0:
         data, addr, port = self.readDatagram(size)
         return data, (ip.addrToString(addr), port)
     else: return bytes(), None