In Multi-Servers Mode, NetGear API robustly handles Multiple Servers at once, thereby providing seamless access to frames and unidirectional data transfer across multiple Publishers/Servers in the network at the same time. Each new server connects to a single client can be identified by its unique port address on the network.
The supported patterns for this mode are Publish/Subscribe (zmq.PUB/zmq.SUB) and Request/Reply(zmq.REQ/zmq.REP) and can be easily activated in NetGear API through multiserver_mode attribute of its options dictionary parameter during initialization.
Important Information regarding Multi-Servers Mode
A unique PORT address MUST be assigned to each Server on the network using its port parameter.
A list/tuple of PORT addresses of all unique Servers MUST be assigned at Client's end using its port parameter for a successful connection.
Patterns 1(i.e. Request/Reply zmq.REQ/zmq.REP) and 2(i.e. Publish/Subscribe zmq.PUB/zmq.SUB) are the only supported values for this Mode. Therefore, calling any other pattern value with is mode will result in ValueError.
Multi-Servers and Multi-Clients exclusive modes CANNOT be enabled simultaneously, Otherwise NetGear API will throw ValueError.
The address parameter value of each Server MUST exactly match the Client.
For sake of simplicity, in these examples we will use only two unique Servers, but, the number of these Servers can be extended to several numbers depending upon your system hardware limits.
All of Servers will be transferring frames to a single Client system at the same time, which will be displaying received frames as a live montage (multiple frames concatenated together).
For building Frames Montage at Client's end, We are going to use imutils python library function to build montages, by concatenating together frames received from different servers. Therefore, Kindly install this library with pip install imutils terminal command.
In this example, we will capturing live video-frames on two independent sources (a.k.a Servers), each with a webcam connected to it. Afterwards, these frames will be sent over the network to a single system (a.k.a Client) using this Multi-Servers Mode in NetGear API in real time, and will be displayed as a live montage.
This example is useful for building applications like Real-Time Security System with multiple cameras.
Open a terminal on Client System (where you want to display the input frames received from Multiple Servers) and execute the following python code:
Important Notes
Note down the local IP-address of this system(required at all Server(s) end) and also replace it in the following code. You can follow this FAQ for this purpose.
Also, assign the tuple/list of port address of all Servers you are going to connect to this system.
You can terminate client anytime by pressing Ctrl+C on your keyboard!
# import required librariesfromvidgear.gearsimportNetGearfromimutilsimportbuild_montages# (1)importcv2# activate multiserver_modeoptions={"multiserver_mode":True}# Define NetGear Client at given IP address and assign list/tuple # of all unique Server((5566,5567) in our case) and other parameters# !!! change following IP address '192.168.x.xxx' with yours !!!client=NetGear(address="192.168.x.x",port=(5566,5567),protocol="tcp",pattern=1,receive_mode=True,**options)# Define received frame dictionaryframe_dict={}# loop over until Keyboard InterruptedwhileTrue:try:# receive data from networkdata=client.recv()# check if data received isn't NoneifdataisNone:break# extract unique port address and its respective frameunique_address,frame=data# {do something with the extracted frame here}# get extracted frame's shape(h,w)=frame.shape[:2]# update the extracted frame in the received frame dictionaryframe_dict[unique_address]=frame# build a montage using data dictionarymontages=build_montages(frame_dict.values(),(w,h),(2,1))# display the montage(s) on the screenfor(i,montage)inenumerate(montages):cv2.imshow("Montage Footage {}".format(i),montage)# check for 'q' key if pressedkey=cv2.waitKey(1)&0xFFifkey==ord("q"):breakexceptKeyboardInterrupt:break# close output windowcv2.destroyAllWindows()# safely close clientclient.close()
For building Frames Montage you'll need imutils python library. Install it with pip install imutils command.
Now, Open the terminal on another Server System (with a webcam connected to it at index 0), and let's called it Server-1. Now execute the following python code:
Replace the IP address in the following code with Client's IP address you noted earlier and also assign a unique port address (required by Client to identify this system).
You can terminate stream anytime by pressing Ctrl+C on your keyboard!
# import librariesfromvidgear.gearsimportNetGearfromvidgear.gearsimportCamGear# Open suitable video stream (webcam on first index in our case)stream=CamGear(source=0).start()# activate multiserver_modeoptions={"multiserver_mode":True}# Define NetGear Server at Client's IP address and assign a unique port address and other parameters# !!! change following IP address '192.168.x.xxx' with yours !!!server=NetGear(address="192.168.x.x",port="5566",protocol="tcp",pattern=1,**options)# loop over until Keyboard InterruptedwhileTrue:try:# read frames from streamframe=stream.read()# check for frame if not None-typeifframeisNone:break# {do something with the frame here}# send frame to serverserver.send(frame)exceptKeyboardInterrupt:break# safely close video streamstream.stop()# safely close serverserver.close()
Finally, Open the terminal on another Server System (also with a webcam connected to it at index 0), and let's called it Server-2. Now execute the following python code:
Replace the IP address in the following code with Client's IP address you noted earlier and also assign a unique port address (required by Client to identify this system).
You can terminate stream anytime by pressing Ctrl+C on your keyboard!
# import librariesfromvidgear.gearsimportNetGearfromvidgear.gearsimportCamGear# Open suitable video stream (webcam on first index in our case)stream=CamGear(source=0).start()# activate multiserver_modeoptions={"multiserver_mode":True}# Define NetGear Server at Client's IP address and assign a unique port address and other parameters# !!! change following IP address '192.168.x.xxx' with yours !!!server=NetGear(address="192.168.x.x",port="5567",protocol="tcp",pattern=1,**options)# loop over until Keyboard InterruptedwhileTrue:try:# read frames from streamframe=stream.read()# check for frame if not None-typeifframeisNone:break# {do something with the frame here}# send frame to serverserver.send(frame)exceptKeyboardInterrupt:break# safely close video streamstream.stop()# safely close serverserver.close()
Open a terminal on Client System (where you want to display the input frames received from Mutiple Servers) and execute the following python code:
Important Notes
Note down the local IP-address of this system(required at all Server(s) end) and also replace it in the following code. You can follow this FAQ for this purpose.
Also, assign the tuple/list of port address of all Servers you are going to connect to this system.
You can terminate client anytime by pressing Ctrl+C on your keyboard!
# import required librariesfromvidgear.gearsimportNetGearfromimutilsimportbuild_montages# (1)importcv2# activate multiserver_modeoptions={"multiserver_mode":True}# Define NetGear Client at given IP address and assign list/tuple of all # unique Server((5566,5567) in our case) and other parameters# !!! change following IP address '192.168.x.xxx' with yours !!!client=NetGear(address="192.168.x.x",port=(5566,5567),protocol="tcp",pattern=2,receive_mode=True,**options)# Define received frame dictionaryframe_dict={}# loop over until Keyboard InterruptedwhileTrue:try:# receive data from networkdata=client.recv()# check if data received isn't NoneifdataisNone:break# extract unique port address and its respective frameunique_address,frame=data# {do something with the extracted frame here}# get extracted frame's shape(h,w)=frame.shape[:2]# update the extracted frame in the received frame dictionaryframe_dict[unique_address]=frame# build a montage using data dictionarymontages=build_montages(frame_dict.values(),(w,h),(2,1))# display the montage(s) on the screenfor(i,montage)inenumerate(montages):cv2.imshow("Montage Footage {}".format(i),montage)# check for 'q' key if pressedkey=cv2.waitKey(1)&0xFFifkey==ord("q"):breakexceptKeyboardInterrupt:break# close output windowcv2.destroyAllWindows()# safely close clientclient.close()
For building Frames Montage you'll need imutils python library. Install it with pip install imutils command.
Now, Open the terminal on another Server System (with a webcam connected to it at index 0), and let's called it Server-1. Now execute the following python code:
Replace the IP address in the following code with Client's IP address you noted earlier and also assign a unique port address (required by Client to identify this system).
You can terminate stream anytime by pressing Ctrl+C on your keyboard!
# import librariesfromvidgear.gearsimportNetGearimportcv2# Open suitable video stream (webcam on first index in our case)stream=cv2.VideoCapture(0)# activate multiserver_modeoptions={"multiserver_mode":True}# Define NetGear Server at Client's IP address and assign a unique port address and other parameter# !!! change following IP address '192.168.x.xxx' with yours !!!server=NetGear(address="192.168.x.x",port="5566",protocol="tcp",pattern=2,**options)# loop over until Keyboard InterruptedwhileTrue:try:# read frames from stream(grabbed,frame)=stream.read()# check for frame if not grabbedifnotgrabbed:break# {do something with the frame here}# send frame to serverserver.send(frame)exceptKeyboardInterrupt:break# safely close video streamstream.release()# safely close serverserver.close()
Finally, Open the terminal on another Server System (also with a webcam connected to it at index 0), and let's called it Server-2. Now execute the following python code:
Replace the IP address in the following code with Client's IP address you noted earlier and also assign a unique port address (required by Client to identify this system).
You can terminate stream anytime by pressing Ctrl+C on your keyboard!
# import librariesfromvidgear.gearsimportNetGearimportcv2# Open suitable video stream (webcam on first index in our case)stream=cv2.VideoCapture(0)# activate multiserver_modeoptions={"multiserver_mode":True}# Define NetGear Server at Client's IP address and assign a unique port address and other parameters# !!! change following IP address '192.168.x.xxx' with yours !!!server=NetGear(address="192.168.x.x",port="5567",protocol="tcp",pattern=2,**options)# loop over until Keyboard InterruptedwhileTrue:try:# read frames from stream(grabbed,frame)=stream.read()# check for frame if not grabbedifnotgrabbed:break# {do something with the frame here}# send frame to serverserver.send(frame)exceptKeyboardInterrupt:break# safely close video streamstream.release()# safely close serverserver.close()
Using Multi-Servers Mode for Unidirectional Custom Data Transfer¶
Abstract
With Multi-Servers Mode, you can send additional data of any datatype1 along with frame with frame in real-time, from all connected Server(s) to a single Client unidirectionally.
But numpy.ndarray data-type is NOT supported as data.
In this example, We will be transferring video-frames and data (a Text String, for the sake of simplicity) from two Servers (consisting of a Raspberry Pi with Camera Module & a Laptop with webcam) to a single Client over the network in real-time. The received video-frames at Client's end will displayed as a live montage, whereas the received data will be printed to the terminal.
Open a terminal on Client System (where you want to display the input frames received from Mutiple Servers) and execute the following python code:
Important Notes
Note down the local IP-address of this system(required at all Server(s) end) and also replace it in the following code. You can follow this FAQ for this purpose.
Also, assign the tuple/list of port address of all Servers you are going to connect to this system.
You can terminate client anytime by pressing Ctrl+C on your keyboard!
# import required librariesfromvidgear.gearsimportNetGearfromimutilsimportbuild_montages# (1)importcv2# activate multiserver_modeoptions={"multiserver_mode":True}# Define NetGear Client at given IP address and assign list/tuple of all unique Server((5577,5578) in our case) and other parameters# !!! change following IP address '192.168.x.xxx' with yours !!!client=NetGear(address="192.168.x.x",port=(5577,5578),protocol="tcp",pattern=1,receive_mode=True,logging=True,**options)# Define received frame dictionaryframe_dict={}# loop over until Keyboard InterruptedwhileTrue:try:# receive data from networkdata=client.recv()# check if data received isn't NoneifdataisNone:break# extract unique port address and its respective frame and received dataunique_address,extracted_data,frame=data# {do something with the extracted frame and data here}# let's display extracted data on our extracted framecv2.putText(frame,extracted_data,(10,frame.shape[0]-10),cv2.FONT_HERSHEY_SIMPLEX,0.6,(0,255,0),2,)# get extracted frame's shape(h,w)=frame.shape[:2]# update the extracted frame in the frame dictionaryframe_dict[unique_address]=frame# build a montage using data dictionarymontages=build_montages(frame_dict.values(),(w,h),(2,1))# display the montage(s) on the screenfor(i,montage)inenumerate(montages):cv2.imshow("Montage Footage {}".format(i),montage)# check for 'q' key if pressedkey=cv2.waitKey(1)&0xFFifkey==ord("q"):breakexceptKeyboardInterrupt:break# close output windowcv2.destroyAllWindows()# safely close clientclient.close()
For building Frames Montage you'll need imutils python library. Install it with pip install imutils command.
Now, Open the terminal on another Server System (with a webcam connected to it at index 0), and let's called it Server-1. Now execute the following python code:
Replace the IP address in the following code with Client's IP address you noted earlier and also assign a unique port address (required by Client to identify this system).
You can terminate stream anytime by pressing Ctrl+C on your keyboard!
# import librariesfromvidgear.gearsimportNetGearfromvidgear.gearsimportVideoGearimportcv2# Open suitable video stream (webcam on first index in our case)stream=VideoGear(source=0).start()# activate multiserver_modeoptions={"multiserver_mode":True}# Define NetGear Server at Client's IP address and assign a unique port address and other parameters# !!! change following IP address '192.168.x.xxx' with yours !!!server=NetGear(address="192.168.x.x",port="5577",protocol="tcp",pattern=1,logging=True,**options)# loop over until Keyboard InterruptedwhileTrue:try:# read frames from streamframe=stream.read()# check for frame if NonetypeifframeisNone:break# {do something with frame and data(to be sent) here}# let's prepare a text string as datatarget_data="I'm Server-1 at Port: 5577"# send frame and data through serverserver.send(frame,message=target_data)# (1)exceptKeyboardInterrupt:break# safely close video streamstream.stop()# safely close serverserver.close()
Everything except numpy.ndarray datatype data is accepted as target_data in message parameter.
Finally, Open the terminal on another Server System (this time a Raspberry Pi with Camera Module connected to it), and let's called it Server-2. Now execute the following python code:
Replace the IP address in the following code with Client's IP address you noted earlier and also assign a unique port address (required by Client to identify this system).
You can terminate stream anytime by pressing Ctrl+C on your keyboard!
Backend PiGear API now fully supports the newer picamera2 python library under the hood for Raspberry Pi camera modules. Follow this guide ➶ for its installation.
# import librariesfromvidgear.gearsimportNetGearfromvidgear.gearsimportPiGearfromlibcameraimportTransformimportcv2# add various Picamera tweak parameters to dictionaryoptions={"queue":True,"buffer_count":4,"controls":{"Brightness":0.5,"ExposureValue":2.0},"transform":Transform(hflip=1),"auto_align_output_config":True,# auto-align camera configuration}# open pi video stream with defined parametersstream=PiGear(resolution=(640,480),framerate=60,logging=True,**options).start()# activate multiserver_modeoptions={"multiserver_mode":True}# Define NetGear Server at Client's IP address and assign a unique port address and other parameters# !!! change following IP address '192.168.x.xxx' with yours !!!server=NetGear(address="192.168.1.xxx",port="5578",protocol="tcp",pattern=1,logging=True,**options)# loop over until Keyboard InterruptedwhileTrue:try:# read frames from streamframe=stream.read()# check for frame if NonetypeifframeisNone:break# {do something with frame and data(to be sent) here}# let's prepare a text string as datatext="I'm Server-2 at Port: 5578"# send frame and data through serverserver.send(frame,message=text)exceptKeyboardInterrupt:break# safely close video stream.stream.stop()# safely close serverserver.close()
Under the hood, Backend PiGear API (version 0.3.3 onwards) prioritizes the new picamera2 API backend.
However, the API seamlessly switches to the legacy picamera backend, if the picamera2 library is unavailable or not installed.
It is advised to enable logging(logging=True) to see which backend is being used.
The picamera library is built on the legacy camera stack that is NOT (and never has been) supported on 64-bit OS builds.
You could also enforce the legacy picamera API backend in PiGear by using the enforce_legacy_picamera user-defined optional parameter boolean attribute.
# import librariesfromvidgear.gearsimportNetGearfromvidgear.gearsimportPiGearimportcv2# add various Picamera tweak parameters to dictionaryoptions={"hflip":True,"exposure_mode":"auto","iso":800,"exposure_compensation":15,"awb_mode":"horizon","sensor_mode":0,}# open pi video stream with defined parametersstream=PiGear(resolution=(640,480),framerate=60,logging=True,**options).start()# activate multiserver_modeoptions={"multiserver_mode":True}# Define NetGear Server at Client's IP address and assign a unique port address and other parameters# !!! change following IP address '192.168.x.xxx' with yours !!!server=NetGear(address="192.168.1.xxx",port="5578",protocol="tcp",pattern=1,logging=True,**options)# loop over until Keyboard InterruptedwhileTrue:try:# read frames from streamframe=stream.read()# check for frame if NonetypeifframeisNone:break# {do something with frame and data(to be sent) here}# let's prepare a text string as datatext="I'm Server-2 at Port: 5578"# send frame and data through serverserver.send(frame,message=text)exceptKeyboardInterrupt:break# safely close video stream.stream.stop()# safely close serverserver.close()
Multi-Servers Mode now also compatible with Bidirectional Mode, which lets you send additional data of any datatype1 along with frame in real-time bidirectionally between a single Client and all connected Server(s).
Important Information
Bidirectional data transfer ONLY works with pattern 1(i.e. Request/Reply zmq.REQ/zmq.REP), and NOT with pattern 2(i.e. Publish/Subscribe zmq.PUB/zmq.SUB)
Additional data of numpy.ndarray data-type is NOT SUPPORTED at Server(s) with their message parameter.
Bidirectional Mode may lead to additional LATENCY depending upon the size of data being transfer bidirectionally. User discretion is advised!
New in v0.2.5
This example was added in v0.2.5.
In this example, We will be transferring video-frames and data (a Text String, for the sake of simplicity) from two Servers (consisting of a Raspberry Pi with Camera Module & a Laptop with webcam) to a single Client, and at same time sending back data (a Text String, for the sake of simplicity) to them over the network all in real-time. The received video-frames at Client's end will displayed as a live montage, whereas the received data will be printed to the terminal.
Open a terminal on Client System (where you want to display the input frames received from Mutiple Servers) and execute the following python code:
Important Notes
Note down the local IP-address of this system(required at all Server(s) end) and also replace it in the following code. You can follow this FAQ for this purpose.
Also, assign the tuple/list of port address of all Servers you are going to connect to this system.
You can terminate client anytime by pressing Ctrl+C on your keyboard!
# import required librariesfromvidgear.gearsimportNetGearfromimutilsimportbuild_montages# (1)importcv2# activate both multiserver and bidirectional modesoptions={"multiserver_mode":True,"bidirectional_mode":True}# Define NetGear Client at given IP address and assign list/tuple of all unique Server((5577,5578) in our case) and other parameters# !!! change following IP address '192.168.x.xxx' with yours !!!client=NetGear(address="192.168.x.x",port=(5577,5578),protocol="tcp",pattern=1,receive_mode=True,logging=True,**options)# Define received frame dictionaryframe_dict={}# loop over until Keyboard InterruptedwhileTrue:try:# prepare data to be senttarget_data="Hi, I am a Client here."# receive data from server(s) and also send our datadata=client.recv(return_data=target_data)# check if data received isn't NoneifdataisNone:break# extract unique port address and its respective frame and received dataunique_address,extracted_data,frame=recv_data# {do something with the extracted frame and data here}# let's display extracted data on our extracted framecv2.putText(frame,extracted_data,(10,frame.shape[0]-10),cv2.FONT_HERSHEY_SIMPLEX,0.6,(0,255,0),2,)# get extracted frame's shape(h,w)=frame.shape[:2]# update the extracted frame in the frame dictionaryframe_dict[unique_address]=frame# build a montage using data dictionarymontages=build_montages(frame_dict.values(),(w,h),(2,1))# display the montage(s) on the screenfor(i,montage)inenumerate(montages):cv2.imshow("Montage Footage {}".format(i),montage)# check for 'q' key if pressedkey=cv2.waitKey(1)&0xFFifkey==ord("q"):breakexceptKeyboardInterrupt:break# close output windowcv2.destroyAllWindows()# safely close clientclient.close()
For building Frames Montage you'll need imutils python library. Install it with pip install imutils command.
Now, Open the terminal on another Server System (with a webcam connected to it at index 0), and let's called it Server-1. Now execute the following python code:
Replace the IP address in the following code with Client's IP address you noted earlier and also assign a unique port address (required by Client to identify this system).
You can terminate stream anytime by pressing Ctrl+C on your keyboard!
# import librariesfromvidgear.gearsimportNetGearfromvidgear.gearsimportVideoGearimportcv2# Open suitable video stream (webcam on first index in our case)stream=VideoGear(source=0).start()# activate both multiserver and bidirectional modesoptions={"multiserver_mode":True,"bidirectional_mode":True}# Define NetGear Server at Client's IP address and assign a unique port address and other parameters# !!! change following IP address '192.168.x.xxx' with yours !!!server=NetGear(address="192.168.x.x",port="5577",protocol="tcp",pattern=1,logging=True,**options)# loop over until Keyboard InterruptedwhileTrue:try:# read frames from streamframe=stream.read()# check for frame if NonetypeifframeisNone:break# {do something with frame and data(to be sent) here}# let's prepare a text string as datatarget_data="I'm Server-1 at Port: 5577"# send frame & data and also receive data from Clientrecv_data=server.send(frame,message=target_data)# (1)# print data just received from Clientifnot(recv_dataisNone):print(recv_data)exceptKeyboardInterrupt:break# safely close video streamstream.stop()# safely close serverserver.close()
Everything except numpy.ndarray datatype data is accepted as target_data in message parameter.
Finally, Open the terminal on another Server System (this time a Raspberry Pi with Camera Module connected to it), and let's called it Server-2. Now execute the following python code:
Replace the IP address in the following code with Client's IP address you noted earlier and also assign a unique port address (required by Client to identify this system).
You can terminate stream anytime by pressing Ctrl+C on your keyboard!
Backend PiGear API now fully supports the newer picamera2 python library under the hood for Raspberry Pi camera modules. Follow this guide ➶ for its installation.
# import librariesfromvidgear.gearsimportNetGearfromvidgear.gearsimportPiGearfromlibcameraimportTransformimportcv2# add various Picamera2 tweak parametersoptions={"queue":True,"buffer_count":4,"controls":{"Brightness":0.5,"ExposureValue":2.0},"transform":Transform(hflip=1),"auto_align_output_config":True,# auto-align camera configuration}# open pi video stream with defined parametersstream=PiGear(resolution=(640,480),framerate=60,logging=True,**options).start()# activate both multiserver and bidirectional modesoptions={"multiserver_mode":True,"bidirectional_mode":True}# Define NetGear Server at Client's IP address and assign a unique port address and other parameters# !!! change following IP address '192.168.x.xxx' with yours !!!server=NetGear(address="192.168.1.xxx",port="5578",protocol="tcp",pattern=1,logging=True,**options)# loop over until Keyboard InterruptedwhileTrue:try:# read frames from streamframe=stream.read()# check for frame if NonetypeifframeisNone:break# {do something with frame and data(to be sent) here}# let's prepare a text string as datatarget_data="I'm Server-2 at Port: 5578"# send frame & data and also receive data from Clientrecv_data=server.send(frame,message=target_data)# (1)# print data just received from Clientifnot(recv_dataisNone):print(recv_data)exceptKeyboardInterrupt:break# safely close video stream.stream.stop()# safely close serverserver.close()
Under the hood, Backend PiGear API (version 0.3.3 onwards) prioritizes the new picamera2 API backend.
However, the API seamlessly switches to the legacy picamera backend, if the picamera2 library is unavailable or not installed.
It is advised to enable logging(logging=True) to see which backend is being used.
The picamera library is built on the legacy camera stack that is NOT (and never has been) supported on 64-bit OS builds.
You could also enforce the legacy picamera API backend in PiGear by using the enforce_legacy_picamera user-defined optional parameter boolean attribute.
# import librariesfromvidgear.gearsimportNetGearfromvidgear.gearsimportPiGearimportcv2# add various Picamera tweak parameters to dictionaryoptions={"hflip":True,"exposure_mode":"auto","iso":800,"exposure_compensation":15,"awb_mode":"horizon","sensor_mode":0,}# open pi video stream with defined parametersstream=PiGear(resolution=(640,480),framerate=60,logging=True,**options).start()# activate both multiserver and bidirectional modesoptions={"multiserver_mode":True,"bidirectional_mode":True}# Define NetGear Server at Client's IP address and assign a unique port address and other parameters# !!! change following IP address '192.168.x.xxx' with yours !!!server=NetGear(address="192.168.1.xxx",port="5578",protocol="tcp",pattern=1,logging=True,**options)# loop over until Keyboard InterruptedwhileTrue:try:# read frames from streamframe=stream.read()# check for frame if NonetypeifframeisNone:break# {do something with frame and data(to be sent) here}# let's prepare a text string as datatarget_data="I'm Server-2 at Port: 5578"# send frame & data and also receive data from Clientrecv_data=server.send(frame,message=target_data)# (1)# print data just received from Clientifnot(recv_dataisNone):print(recv_data)exceptKeyboardInterrupt:break# safely close video stream.stream.stop()# safely close serverserver.close()
Everything except numpy.ndarray datatype data is accepted as target_data in message parameter.
Additional data of numpy.ndarray data-type is NOT SUPPORTED at Server(s) with their message parameter.