telnet_connection_v2 vnc_server_v2
API Reference Manual  /  7 Simulator-to-Simulator Interfaces  / 

vnc_server

Description
The vnc_server interface is used to control the graphics console VNC server.

The graphics console has a built-in VNC server, supporting any number of connected clients. Both IPv4 and IPv6 connections are supported.

The setup method starts a VNC server by opening a listening socket on port, or an arbitrary port if 0 is given. If a listening port is already open, it is closed first, without disconnecting any connected clients. The method returns false if the socket could not be opened e.g. if the given port is busy and the new_telnet_port_if_busy attribute is false.

The listening method indicates whether a listening socket has been opened.

The num_clients method returns the number of connected clients.

The local_port method returns the port of the listening socket, or 0 if no socket is opened.

The shutdown method disconnects any client and closes the listening socket.

SIM_INTERFACE(vnc_server) {
        bool (*setup)(conf_object_t *NOTNULL obj, uint16 port);
        bool (*listening)(conf_object_t *NOTNULL obj);
        int (*num_clients)(conf_object_t *NOTNULL obj);
        uint16 (*local_port)(conf_object_t *NOTNULL obj);
        void (*shutdown)(conf_object_t *NOTNULL obj);
};
#define VNC_SERVER_INTERFACE "vnc_server"

Execution Context
Global Context for all methods

telnet_connection_v2 vnc_server_v2