CVB.Net 14.0
Server Class Reference

A WebSocket server for sending image data. More...

Inherits INativeHandle.

Public Member Functions

 Server (IPAddress ipAddress, int port)
 Constructor. Images are not converted before sending (raw). More...
 
 Server (IPAddress ipAddress, int port, Converter converter)
 Constructor. Images are converted according to the given converter before sending. More...
 
void Dispose ()
 IDisposable implementation.
 
void SendSync (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. More...
 
void SendAsync (Image image)
 Sends an image asynchronously. The image will be copied/converted and put on a queue. After that the function will return immediately. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 IDisposable helper function. More...
 

Properties

IntPtr Handle [get]
 Native handle of the Finder.
 
bool IsDisposed [get]
 Gets if the native handle has been disposed.
 
IPAddress IPAddress [get]
 The IP address of the server.
 
int Port [get]
 The port of the server.
 
int ActiveConnections [get]
 Number of active connections.
 
- Properties inherited from INativeHandle
IntPtr Handle [get]
 The native handle of the object.
 
bool IsDisposed [get]
 Possibility to check whether the object has already been disposed of.
 

Events

NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method. More...
 
- Events inherited from INativeHandle
NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method.
More...
 

Detailed Description

A WebSocket server for sending image data.

Constructor & Destructor Documentation

◆ Server() [1/2]

Server ( IPAddress  ipAddress,
int  port 
)

Constructor. Images are not converted before sending (raw).

Parameters
ipAddressThe IP-Address for the server. Example: 169.254.0.1.
portThe port for the server. Example: 1112
Exceptions
ArgumentNullExceptionWhen ipAddress is null.
CvbExceptionWhen an error during server creation occurs.

◆ Server() [2/2]

Server ( IPAddress  ipAddress,
int  port,
Converter  converter 
)

Constructor. Images are converted according to the given converter before sending.

Parameters
ipAddressThe IP-Address for the server. Example: 169.254.0.1.
portThe port for the server. Example: 1112
converterConverter to use.
Exceptions
ArgumentNullExceptionWhen ipAddress or converter is null.
CvbExceptionWhen an error during server creation occurs.

Member Function Documentation

◆ Dispose()

virtual void Dispose ( bool  disposing)
protectedvirtual

IDisposable helper function.

Parameters
disposing

◆ SendAsync()

void SendAsync ( 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
imageImage to send.
Exceptions
ArgumentNullExceptionWhen image is null.
CvbExceptionWhen an error during sending occurs.

◆ SendSync()

void SendSync ( 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
imageImage to send.
Exceptions
ArgumentNullExceptionWhen image is null.
CvbExceptionWhen an error during sending occurs.

Event Documentation

◆ ObjectDisposing

NativeHandleEventDelegate ObjectDisposing

Raised when this object is about to be disposed via the IDisposable.Dispose method.

This event is raised right before this object is disposed. The dispose itself cannot be canceled.