MCPcopy Create free account
hub / github.com/FDio/vpp / write

Method write

src/vpp-api/python/vpp_papi/vpp_transport_socket.py:183–194  ·  view source on GitHub ↗

Send a binary-packed message to VPP.

(self, buf)

Source from the content-addressed store, hash-verified

181 return max(self.message_table.values() or [0])
182
183 def write(self, buf):
184 """Send a binary-packed message to VPP."""
185 if not self.connected:
186 raise VppTransportSocketIOError(1, "Not connected")
187
188 # Send header
189 header = self.header.pack(0, len(buf), 0)
190 try:
191 self.socket.sendall(header)
192 self.socket.sendall(buf)
193 except socket.error as err:
194 raise VppTransportSocketIOError(1, "Sendall error: {err!r}".format(err=err))
195
196 def _read_fixed(self, size):
197 """Repeat receive until fixed size is read. Return empty on error."""

Callers 15

connectMethod · 0.95
install_golangFunction · 0.45
runFunction · 0.45
runFunction · 0.45
connectMethod · 0.45
_writeMethod · 0.45
_call_vppMethod · 0.45
_call_vpp_asyncMethod · 0.45
tmp_renderMethod · 0.45
create_streamMethod · 0.45
create_streamMethod · 0.45
create_streamMethod · 0.45

Calls 3

formatMethod · 0.80
packMethod · 0.45

Tested by 8

vt_udp_acceptFunction · 0.36
vts_server_process_rxFunction · 0.36
vts_server_echoFunction · 0.36
vts_handle_ctrl_cfgFunction · 0.36
vtc_worker_run_selectFunction · 0.36
vtc_worker_run_epollFunction · 0.36
vtc_echo_clientFunction · 0.36