Esempio n. 1
0
 def alive2Request(self, portNumber, nodeType, distrVSNRange, nodeName,
                   extra=""):
     """
     Create a C{ALIVE2_REQ} request and send it over the wire.
     """
     data = struct.pack('!BHBBHHH', self.ALIVE2_REQ, portNumber, nodeType,
         0, distrVSNRange[0], distrVSNRange[1], len(nodeName))
     data += nodeName
     data += thePacker.packShort(len(extra))
     data += extra
     self.send(data)
Esempio n. 2
0
File: node.py Progetto: gbour/twotp
 def send_handshake(self, data):
     """
     Send during the handshake state.
     """
     msg = thePacker.packShort(len(data)) + data
     self.transport.write(msg)
Esempio n. 3
0
 def send(self, data):
     """
     Send data to the EPMD.
     """
     msg = thePacker.packShort(len(data)) + data
     self.transport.write(msg)