CVBpy 14.1
Server Class Reference

A WebSocket server. More...

Inherits object.

Public Member Functions

cvb.webstreaming.Server create (str ip_address, int port, Optional[Union[cvb.webstreaming.JPEGConverter, cvb.webstreaming.RGBAConverter]] converter)
 Creates a WebSocket server with given converter. More...
 
None send_async (self, cvb.Image image)
 Sends an image asynchronously. More...
 
None send_sync (self, cvb.Image image)
 Sends an image synchronously. More...
 

Properties

 active_connections = property
 int: Get the number of active connections.
 
 ip_address = property
 str: Get the IP address of the server.
 
 port = property
 int: Get destination port.
 

Detailed Description

A WebSocket server.

Server for sending image data.

Member Function Documentation

◆ create()

cvb.webstreaming.Server create ( str  ip_address,
int  port,
Optional[Union[cvb.webstreaming.JPEGConverter, cvb.webstreaming.RGBAConverter]]  converter 
)

Creates a WebSocket server with given converter.

Images are converted according to the given converter before sending.

Parameters

ip_address : str The IP - Address for the server.Example: 169.254.0.1.

port : int The port for the server. Example: 1112

converter : Optional[Union[cvb.webstreaming.JPEGConverter, cvb.webstreaming.RGBAConverter]] The converter to use

Returns

cvb.webstreaming.Server A server object.

◆ send_async()

None send_async (   self,
cvb.Image  image 
)

Sends an image asynchronously.

The image will be copied/converted and put on a queue. After that the function will return immediately.

Parameters

image : cvb.Image The image to send.

◆ send_sync()

None send_sync (   self,
cvb.Image  image 
)

Sends an image synchronously.

The image will be copied/converted and put on a queue. Once the image was sent the method will return.

Parameters

image : cvb.Image The image to send.