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

Method recv_data

afy/networking.py:106–124  ·  view source on GitHub ↗

Receives a jpg buffer and a text msg. Receives a jpg bytestring of an OpenCV image. Also receives a text msg, often the image name. Arguments: flags: (optional) zmq flags. copy: (optional) zmq copy flag. track: (optional) zmq track flag.

(self, flags=0, copy=True, track=False)

Source from the content-addressed store, hash-verified

104 return (md['msg'], A.reshape(md['shape']))
105
106 def recv_data(self, flags=0, copy=True, track=False):
107 """Receives a jpg buffer and a text msg.
108
109 Receives a jpg bytestring of an OpenCV image.
110 Also receives a text msg, often the image name.
111
112 Arguments:
113 flags: (optional) zmq flags.
114 copy: (optional) zmq copy flag.
115 track: (optional) zmq track flag.
116
117 Returns:
118 msg: image name or text message.
119 data: bytestring, containing data.
120 """
121
122 md = self.recv_json(flags=flags) # metadata text
123 data = self.recv(flags=flags, copy=copy, track=track)
124 return (md['msg'], data)
125
126
127class SerializingContext(zmq.Context):

Callers 3

check_connectionFunction · 0.80
recv_workerMethod · 0.80
recv_workerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected