C# 클래스 VncSharpWpf.VncClient

파일 보기 프로젝트 열기: nakano531/VncSharpWpf 1 사용 예제들

공개 메소드들

메소드 설명
Authenticate ( string password ) : bool

Use a password to authenticate with a VNC Host. NOTE: This is only necessary if Connect() returns TRUE.

Connect ( string host ) : bool

Connect to a VNC Host and determine which type of Authentication it uses. If the host uses Password Authentication, a call to Authenticate() will be required. Default Display and Port numbers are used.

Connect ( string host, int display ) : bool

Connect to a VNC Host and determine which type of Authentication it uses. If the host uses Password Authentication, a call to Authenticate() will be required. The Port number is calculated based on the Display.

Connect ( string host, int display, int port ) : bool
Connect ( string host, int display, int port, bool viewOnly ) : bool

Connect to a VNC Host and determine which type of Authentication it uses. If the host uses Password Authentication, a call to Authenticate() will be required.

Disconnect ( ) : void

Stops sending requests for updates and disconnects from the remote host. You must call Connect() again if you wish to re-establish a connection.

Initialize ( ) : void

Finish setting-up protocol with VNC Host. Should be called after Connect and Authenticate (if password required).

Listen ( string host, int port, bool viewOnly ) : void

Wait for a connection from VNC Server.

RequestScreenUpdate ( bool refreshFullScreen ) : void

Requests that the remote host send a screen update.

RequestScreenUpdate needs to be called whenever the client screen needs to be updated to reflect the state of the remote desktop. Typically you only need to have a particular region of the screen updated and can still use the rest of the pixels on the client-side (i.e., when moving the mouse pointer, only the area around the pointer changes). Therefore, you should almost always set refreshFullScreen to FALSE. If the client-side image becomes corrupted, call RequestScreenUpdate with refreshFullScreen set to TRUE to get the complete image sent again.

SetInputMode ( bool viewOnly ) : void

Changes the input mode to view-only or interactive.

StartUpdates ( ) : void

Begin getting updates from the VNC Server. This will continue until StopUpdates() is called. NOTE: this must be called after Connect().

StopListen ( ) : void
VncClient ( ) : System
WriteClientCutText ( string text ) : void
WriteKeyboardEvent ( uint keysym, bool pressed ) : void
WritePointerEvent ( byte buttonMask, Point point ) : void

보호된 메소드들

메소드 설명
EncryptChallenge ( string password, byte challenge ) : byte[]

Encrypts a challenge using the specified password. See RFB Protocol Document v. 3.8 section 6.2.2.

GetSupportedSecurityType ( byte types ) : byte

Examines a list of Security Types supported by a VNC Server and chooses one that the Client supports. See 6.1.2 of the RFB Protocol document v. 3.8.

OnConnectionLost ( ) : void
OnServerCutText ( ) : void
PerformVncAuthentication ( string password ) : void

Performs VNC Authentication using VNC DES encryption. See the RFB Protocol doc 6.2.2.

비공개 메소드들

메소드 설명
Beep ( int freq, int duration ) : bool
CheckIfThreadDone ( ) : bool
ConnectCore ( string host, int display, int &port, bool viewOnly, bool connectFromClient ) : bool

Main Function for Connect Process.

ConnectedFromServerEventHandler ( object sender, EventArgs e ) : void

EventHandler for event "ConnectedFromServer"

DoHandShake ( ) : bool
FailedToListenHandler ( object sender, EventArgs e ) : void

EventHandler for event "FailedToListen"

GetRfbUpdates ( ) : void

Worker thread lives here and processes protocol messages infinitely, triggering events or other actions as necessary.

메소드 상세

Authenticate() 공개 메소드

Use a password to authenticate with a VNC Host. NOTE: This is only necessary if Connect() returns TRUE.
public Authenticate ( string password ) : bool
password string The password to use.
리턴 bool

Connect() 공개 메소드

Connect to a VNC Host and determine which type of Authentication it uses. If the host uses Password Authentication, a call to Authenticate() will be required. Default Display and Port numbers are used.
public Connect ( string host ) : bool
host string The IP Address or Host Name of the VNC Host.
리턴 bool

Connect() 공개 메소드

Connect to a VNC Host and determine which type of Authentication it uses. If the host uses Password Authentication, a call to Authenticate() will be required. The Port number is calculated based on the Display.
public Connect ( string host, int display ) : bool
host string The IP Address or Host Name of the VNC Host.
display int The Display number (used on Unix hosts).
리턴 bool

Connect() 공개 메소드

public Connect ( string host, int display, int port ) : bool
host string
display int
port int
리턴 bool

Connect() 공개 메소드

Connect to a VNC Host and determine which type of Authentication it uses. If the host uses Password Authentication, a call to Authenticate() will be required.
public Connect ( string host, int display, int port, bool viewOnly ) : bool
host string The IP Address or Host Name of the VNC Host.
display int The Display number (used on Unix hosts).
port int The Port number used by the Host, usually 5900.
viewOnly bool True if mouse/keyboard events are to be ignored.
리턴 bool

Disconnect() 공개 메소드

Stops sending requests for updates and disconnects from the remote host. You must call Connect() again if you wish to re-establish a connection.
public Disconnect ( ) : void
리턴 void

EncryptChallenge() 보호된 메소드

Encrypts a challenge using the specified password. See RFB Protocol Document v. 3.8 section 6.2.2.
protected EncryptChallenge ( string password, byte challenge ) : byte[]
password string The user's password.
challenge byte The challenge sent by the server.
리턴 byte[]

GetSupportedSecurityType() 보호된 메소드

Examines a list of Security Types supported by a VNC Server and chooses one that the Client supports. See 6.1.2 of the RFB Protocol document v. 3.8.
protected GetSupportedSecurityType ( byte types ) : byte
types byte An array of bytes representing the Security Types supported by the VNC Server.
리턴 byte

Initialize() 공개 메소드

Finish setting-up protocol with VNC Host. Should be called after Connect and Authenticate (if password required).
public Initialize ( ) : void
리턴 void

Listen() 공개 메소드

Wait for a connection from VNC Server.
public Listen ( string host, int port, bool viewOnly ) : void
host string
port int
viewOnly bool
리턴 void

OnConnectionLost() 보호된 메소드

protected OnConnectionLost ( ) : void
리턴 void

OnServerCutText() 보호된 메소드

protected OnServerCutText ( ) : void
리턴 void

PerformVncAuthentication() 보호된 메소드

Performs VNC Authentication using VNC DES encryption. See the RFB Protocol doc 6.2.2.
protected PerformVncAuthentication ( string password ) : void
password string A string containing the user's password in clear text format.
리턴 void

RequestScreenUpdate() 공개 메소드

Requests that the remote host send a screen update.
RequestScreenUpdate needs to be called whenever the client screen needs to be updated to reflect the state of the remote desktop. Typically you only need to have a particular region of the screen updated and can still use the rest of the pixels on the client-side (i.e., when moving the mouse pointer, only the area around the pointer changes). Therefore, you should almost always set refreshFullScreen to FALSE. If the client-side image becomes corrupted, call RequestScreenUpdate with refreshFullScreen set to TRUE to get the complete image sent again.
public RequestScreenUpdate ( bool refreshFullScreen ) : void
refreshFullScreen bool TRUE if the entire screen should be refreshed, FALSE if only a partial region needs updating.
리턴 void

SetInputMode() 공개 메소드

Changes the input mode to view-only or interactive.
public SetInputMode ( bool viewOnly ) : void
viewOnly bool True if view-only mode is desired (no mouse/keyboard events will be sent).
리턴 void

StartUpdates() 공개 메소드

Begin getting updates from the VNC Server. This will continue until StopUpdates() is called. NOTE: this must be called after Connect().
public StartUpdates ( ) : void
리턴 void

StopListen() 공개 메소드

public StopListen ( ) : void
리턴 void

VncClient() 공개 메소드

public VncClient ( ) : System
리턴 System

WriteClientCutText() 공개 메소드

public WriteClientCutText ( string text ) : void
text string
리턴 void

WriteKeyboardEvent() 공개 메소드

public WriteKeyboardEvent ( uint keysym, bool pressed ) : void
keysym uint
pressed bool
리턴 void

WritePointerEvent() 공개 메소드

public WritePointerEvent ( byte buttonMask, Point point ) : void
buttonMask byte
point Point
리턴 void