Learn how to evaluate and integrate the VNC SDK

We're here if you need help.

Server

class vncsdk.Server

A VNC-compatible Server enabling a computer to be remotely controlled.

Constructor Summary

Modifier and Type Method and Description

__init__(agent_path, is_service=False)

Creates a Server, running as a service if is_service is passed as True.

Method Summary

Modifier and Type Method and Description

destroy()

Destroys the Server.

disconnect(connection, message, flags)

Disconnects a particular Viewer, optionally specifying a message.

disconnect_all(message, flags)

Disconnects all Viewers, optionally specifying a message.

enable_audio(enable)

Enables transmission of audio from the Server to the Viewer.

vncsdk.AnnotationManager

get_annotation_manager()

Obtains the Server’s vncsdk.AnnotationManager for handling annotation operations.

int

get_connection_count()

Returns the total number of Viewers currently connected to the Server.

vncsdk.ConnectionHandler

get_connection_handler()

Obtains the Server’s vncsdk.ConnectionHandler for performing connection operations.

vncsdk.DisplayManager

get_display_manager()

Obtains the Server’s vncsdk.DisplayManager, for managing the list of displays made available by the Server and for setting the Server’s capture method.

vncsdk.Server.EncryptionLevel

get_encryption_level(connection)

Returns the encryption level being used with an incoming connection, or the Server’s current encryption level if the connection is None.

int

get_idle_timeout()

Gets the current number of seconds to wait before disconnecting idle Viewers.

vncsdk.MessagingManager

get_messaging_manager()

Obtains the Server’s vncsdk.MessagingManager for handling messaging.

str

get_peer_address(connection)

Returns the address of a particular connected Viewer.

{vncsdk.Server.Permissions}

get_permissions(connection)

Gets the set of current permissions for a Viewer.

bool

is_agent_ready()

Determines if the vncagent process is ready and available to capture the display and inject input events.

set_agent_callback(callback)

Sets agent-related callbacks for the Server.

set_blacklist(threshold, timeout)

Specifies a blacklist threshold and timeout for the Server.

set_capture_method(capture_method)

Specifies the screen capture method used by the Server.

set_connection_callback(callback)

Sets connection-related callbacks for the Server.

set_encryption_level(level)

Sets the desired encryption level of the session from the range of options enumerated by ENCRYPTION_LEVEL.

set_friendly_name(name)

Specifies a friendly name for the Server, to send to connected Viewers.

set_idle_timeout(idle_timeout)

Sets the number of seconds to wait before disconnecting idle Viewers.

set_input_events_callback(callback)

Sets input control related callbacks for the Server.

set_permissions(connection, perms)

Changes permissions for a Viewer mid-session.

set_security_callback(callback)

Sets security-related callbacks for the Server.

set_vnc_auth_password(password)

Set a password for use with third-party VNC Viewers, using VncAuth authentication.

Constructor

vncsdk.Server.__init__(agent_path, is_service=False)

Creates a Server, running as a service if is_service is passed as True.

If agent_path is passed in as None, the agent binary is searched for in the main module’s directory.

Parameters:
  • agent_path (str or None) –
  • is_service (bool) –

Methods

Server.destroy()

Destroys the Server.

For more information, see vnc_Server_destroy().

Server.disconnect(connection, message, flags)

Disconnects a particular Viewer, optionally specifying a message.

For more information, see vnc_Server_disconnect().

Parameters:
Server.disconnect_all(message, flags)

Disconnects all Viewers, optionally specifying a message.

For more information, see vnc_Server_disconnectAll().

Parameters:
Server.enable_audio(enable)

Enables transmission of audio from the Server to the Viewer.

For more information, see vnc_Server_enableAudio().

Parameters:enable (bool) –
Server.get_annotation_manager()

Obtains the Server’s vncsdk.AnnotationManager for handling annotation operations.

For more information, see vnc_Server_getAnnotationManager().

Return type:vncsdk.AnnotationManager
Server.get_connection_count()

Returns the total number of Viewers currently connected to the Server.

For more information, see vnc_Server_getConnectionCount().

Return type:int
Server.get_connection_handler()

Obtains the Server’s vncsdk.ConnectionHandler for performing connection operations.

For more information, see vnc_Server_getConnectionHandler().

Return type:vncsdk.ConnectionHandler
Server.get_display_manager()

Obtains the Server’s vncsdk.DisplayManager, for managing the list of displays made available by the Server and for setting the Server’s capture method.

For more information, see vnc_Server_getDisplayManager().

Return type:vncsdk.DisplayManager
Server.get_encryption_level(connection)

Returns the encryption level being used with an incoming connection, or the Server’s current encryption level if the connection is None.

For more information, see vnc_Server_getEncryptionLevel().

Parameters:connection (vncsdk.Connection) –
Return type:vncsdk.Server.EncryptionLevel
Server.get_idle_timeout()

Gets the current number of seconds to wait before disconnecting idle Viewers.

For more information, see vnc_Server_getIdleTimeout().

Return type:int
Server.get_messaging_manager()

Obtains the Server’s vncsdk.MessagingManager for handling messaging.

For more information, see vnc_Server_getMessagingManager().

Return type:vncsdk.MessagingManager
Server.get_peer_address(connection)

Returns the address of a particular connected Viewer.

For more information, see vnc_Server_getPeerAddress().

Parameters:connection (vncsdk.Connection) –
Return type:str
Server.get_permissions(connection)

Gets the set of current permissions for a Viewer.

For more information, see vnc_Server_getPermissions().

Parameters:connection (vncsdk.Connection) –
Return type:{vncsdk.Server.Permissions}
Server.is_agent_ready()

Determines if the vncagent process is ready and available to capture the display and inject input events.

For more information, see vnc_Server_isAgentReady().

Return type:bool
Server.set_agent_callback(callback)

Sets agent-related callbacks for the Server.

For more information, see vnc_Server_setAgentCallback().

Parameters:callback (vncsdk.Server.AgentCallback or None) –
Server.set_blacklist(threshold, timeout)

Specifies a blacklist threshold and timeout for the Server.

For more information, see vnc_Server_setBlacklist().

Parameters:
  • threshold (int) –
  • timeout (int) –
Server.set_capture_method(capture_method)

Specifies the screen capture method used by the Server.

For more information, see vnc_Server_setCaptureMethod().

Parameters:capture_method (vncsdk.Server.CaptureMethod) –
Server.set_connection_callback(callback)

Sets connection-related callbacks for the Server.

For more information, see vnc_Server_setConnectionCallback().

Parameters:callback (vncsdk.Server.ConnectionCallback or None) –
Server.set_encryption_level(level)

Sets the desired encryption level of the session from the range of options enumerated by ENCRYPTION_LEVEL.

For more information, see vnc_Server_setEncryptionLevel().

Parameters:level (vncsdk.Server.EncryptionLevel) –
Server.set_friendly_name(name)

Specifies a friendly name for the Server, to send to connected Viewers.

For more information, see vnc_Server_setFriendlyName().

Parameters:name (str) –
Server.set_idle_timeout(idle_timeout)

Sets the number of seconds to wait before disconnecting idle Viewers.

For more information, see vnc_Server_setIdleTimeout().

Parameters:idle_timeout (int) –
Server.set_input_events_callback(callback)

Sets input control related callbacks for the Server.

For more information, see vnc_Server_setInputEventsCallback().

Parameters:callback (vncsdk.Server.InputEventsCallback or None) –
Server.set_permissions(connection, perms)

Changes permissions for a Viewer mid-session.

For more information, see vnc_Server_setPermissions().

Parameters:
Server.set_security_callback(callback)

Sets security-related callbacks for the Server.

For more information, see vnc_Server_setSecurityCallback().

Parameters:callback (vncsdk.Server.SecurityCallback or None) –
Server.set_vnc_auth_password(password)

Set a password for use with third-party VNC Viewers, using VncAuth authentication.

For more information, see vnc_Server_setVncAuthPassword().

Parameters:password (str) –
×