C# Класс RemoteViewing.Vnc.VncClient

Connects to a remote VNC server and interacts with it.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Close ( ) : void

Closes the connection with the remote server.

Connect ( Stream stream, VncClientConnectOptions options = null ) : void

Connects to a VNC server.

Connect ( string hostname, int port = 5900, VncClientConnectOptions options = null ) : void

Connects to a VNC server with the specified hostname and port.

SendKeyEvent ( int keysym, bool pressed ) : void

Sends a key event to the VNC server to indicate a key has been pressed or released.

SendLocalClipboardChange ( string data ) : void

Notifies the server that the local clipboard has changed. If you are implementing clipboard integration, use this to set the remote clipboard.

SendPointerEvent ( int x, int y, int pressedButtons ) : void

Sends a pointer event to the VNC server to indicate mouse motion, a button click, etc.

VncClient ( ) : System

Initializes a new instance of the VncClient class.

Защищенные методы

Метод Описание
OnBell ( ) : void

Raises the Bell event

OnClosed ( ) : void

Raises the Close event.

OnConnected ( ) : void

Raises the Connected event.

OnConnectionFailed ( ) : void

Raises the ConnectionFailed event.

OnFramebufferChanged ( FramebufferChangedEventArgs e ) : void

Raises the FramebufferChanged event.

OnRemoteClipboardChanged ( RemoteClipboardChangedEventArgs e ) : void

Raises the RemoteClipboardChanged event.

Приватные методы

Метод Описание
AllocateFramebufferScratch ( int bytes ) : byte[]
CopyToFramebuffer ( int tx, int ty, int w, int h, byte pixels ) : void
CopyToGeneral ( int tx, int ty, int tw, int th, byte outPixels, int sx, int sy, int sw, int sh, byte inPixels, int w, int h ) : void
HandleBell ( ) : void
HandleFramebufferUpdate ( ) : void
HandleReceiveClipboardData ( ) : void
HandleSetColorMapEntries ( ) : void
InitFramebufferDecoder ( ) : void
NegotiateDesktop ( ) : void
NegotiateEncodings ( ) : void
NegotiateSecurity ( ) : void
NegotiateVersion ( ) : void
SendFramebufferUpdateRequest ( bool incremental ) : void
ThreadMain ( ) : void

Описание методов

Close() публичный Метод

Closes the connection with the remote server.
public Close ( ) : void
Результат void

Connect() публичный Метод

Connects to a VNC server.
public Connect ( Stream stream, VncClientConnectOptions options = null ) : void
stream Stream The stream containing the connection.
options VncClientConnectOptions Connection options, if any. You can specify a password here.
Результат void

Connect() публичный Метод

Connects to a VNC server with the specified hostname and port.
public Connect ( string hostname, int port = 5900, VncClientConnectOptions options = null ) : void
hostname string The name of the host to connect to.
port int The port to connect on. 5900 is the usual for VNC.
options VncClientConnectOptions Connection options, if any. You can specify a password here.
Результат void

OnBell() защищенный Метод

Raises the Bell event
protected OnBell ( ) : void
Результат void

OnClosed() защищенный Метод

Raises the Close event.
protected OnClosed ( ) : void
Результат void

OnConnected() защищенный Метод

Raises the Connected event.
protected OnConnected ( ) : void
Результат void

OnConnectionFailed() защищенный Метод

Raises the ConnectionFailed event.
protected OnConnectionFailed ( ) : void
Результат void

OnFramebufferChanged() защищенный Метод

Raises the FramebufferChanged event.
protected OnFramebufferChanged ( FramebufferChangedEventArgs e ) : void
e FramebufferChangedEventArgs /// A that describes the changes /// in the framebuffer. ///
Результат void

OnRemoteClipboardChanged() защищенный Метод

Raises the RemoteClipboardChanged event.
protected OnRemoteClipboardChanged ( RemoteClipboardChangedEventArgs e ) : void
e RemoteClipboardChangedEventArgs /// A that contains information on the /// clipboard changes. ///
Результат void

SendKeyEvent() публичный Метод

Sends a key event to the VNC server to indicate a key has been pressed or released.
public SendKeyEvent ( int keysym, bool pressed ) : void
keysym int The X11 keysym of the key. For many keys this is the ASCII value.
pressed bool true for a key press event, or false for a key release event.
Результат void

SendLocalClipboardChange() публичный Метод

Notifies the server that the local clipboard has changed. If you are implementing clipboard integration, use this to set the remote clipboard.
public SendLocalClipboardChange ( string data ) : void
data string The contents of the local clipboard.
Результат void

SendPointerEvent() публичный Метод

Sends a pointer event to the VNC server to indicate mouse motion, a button click, etc.
public SendPointerEvent ( int x, int y, int pressedButtons ) : void
x int The X coordinate of the mouse.
y int The Y coordinate of the mouse.
pressedButtons int /// A bit mask of pressed mouse buttons, in X11 convention: 1 is left, 2 is middle, and 4 is right. /// Mouse wheel scrolling is treated as a button event: 8 for up and 16 for down. ///
Результат void

VncClient() публичный Метод

Initializes a new instance of the VncClient class.
public VncClient ( ) : System
Результат System