MCPcopy Index your code
hub / github.com/alievk/avatarify-python / send_data

Method send_data

afy/networking.py:61–82  ·  view source on GitHub ↗

Send a jpg buffer with a text message. Sends a jpg bytestring of an OpenCV image. Also sends text msg, often the image name. Arguments: msg: image name or text message. data: binary data to be sent. flags: (optional) zmq flags. copy:

(self,
                 msg='NoName',
                 data=b'00',
                 flags=0,
                 copy=True,
                 track=False)

Source from the content-addressed store, hash-verified

59 return self.send(A, flags, copy=copy, track=track)
60
61 def send_data(self,
62 msg='NoName',
63 data=b'00',
64 flags=0,
65 copy=True,
66 track=False):
67 """Send a jpg buffer with a text message.
68
69 Sends a jpg bytestring of an OpenCV image.
70 Also sends text msg, often the image name.
71
72 Arguments:
73 msg: image name or text message.
74 data: binary data to be sent.
75 flags: (optional) zmq flags.
76 copy: (optional) zmq copy flag.
77 track: (optional) zmq track flag.
78 """
79
80 md = dict(msg=msg, )
81 self.send_json(md, flags | zmq.SNDMORE)
82 return self.send(data, flags, copy=copy, track=track)
83
84 def recv_array(self, flags=0, copy=True, track=False):
85 """Receives a numpy array with metadata and text message.

Callers 3

check_connectionFunction · 0.80
send_workerMethod · 0.80
send_workerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected