示例#1
0
文件: epmd.py 项目: cybergrind/twotp
 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)
示例#2
0
文件: node.py 项目: gbour/twotp
 def send_handshake(self, data):
     """
     Send during the handshake state.
     """
     msg = thePacker.packShort(len(data)) + data
     self.transport.write(msg)
示例#3
0
文件: epmd.py 项目: cybergrind/twotp
 def send(self, data):
     """
     Send data to the EPMD.
     """
     msg = thePacker.packShort(len(data)) + data
     self.transport.write(msg)