C# Class RemoteViewing.Vnc.VncClient

Connects to a remote VNC server and interacts with it.
Afficher le fichier Open project: qmfrederik/remoteviewing Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

Close() public méthode

Closes the connection with the remote server.
public Close ( ) : void
Résultat void

Connect() public méthode

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.
Résultat void

Connect() public méthode

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.
Résultat void

OnBell() protected méthode

Raises the Bell event
protected OnBell ( ) : void
Résultat void

OnClosed() protected méthode

Raises the Close event.
protected OnClosed ( ) : void
Résultat void

OnConnected() protected méthode

Raises the Connected event.
protected OnConnected ( ) : void
Résultat void

OnConnectionFailed() protected méthode

Raises the ConnectionFailed event.
protected OnConnectionFailed ( ) : void
Résultat void

OnFramebufferChanged() protected méthode

Raises the FramebufferChanged event.
protected OnFramebufferChanged ( FramebufferChangedEventArgs e ) : void
e FramebufferChangedEventArgs /// A that describes the changes /// in the framebuffer. ///
Résultat void

OnRemoteClipboardChanged() protected méthode

Raises the RemoteClipboardChanged event.
protected OnRemoteClipboardChanged ( RemoteClipboardChangedEventArgs e ) : void
e RemoteClipboardChangedEventArgs /// A that contains information on the /// clipboard changes. ///
Résultat void

SendKeyEvent() public méthode

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.
Résultat void

SendLocalClipboardChange() public méthode

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.
Résultat void

SendPointerEvent() public méthode

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. ///
Résultat void

VncClient() public méthode

Initializes a new instance of the VncClient class.
public VncClient ( ) : System
Résultat System