MCPcopy Create free account
hub / github.com/F-Stack/f-stack / register

Method register

dpdk/usertools/dpdk-telemetry-client.py:62–76  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

60 RUNTIME_SOCKET_NAME)
61
62 def register(self):
63 # Connects a client to DPDK-instance
64 if os.path.exists(self.file_path):
65 os.unlink(self.file_path)
66 try:
67 self.socket.recv_fd.bind(self.file_path)
68 except socket.error as msg:
69 print("Error - Socket binding error: " + str(msg) + "\n")
70 self.socket.recv_fd.settimeout(2)
71 self.socket.send_fd.connect(self.run_path)
72 JSON = (API_REG + self.file_path + "\"}}")
73 self.socket.send_fd.sendall(JSON.encode())
74
75 self.socket.recv_fd.listen(1)
76 self.socket.client_fd = self.socket.recv_fd.accept()[0]
77
78 def unregister(self):
79 # Unregister a given client

Callers 2

_create_tarballMethod · 0.80

Calls 3

connectMethod · 0.80
acceptMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected