C# 클래스 VncSharpWpf.RfbProtocol

Contains methods and properties to handle all aspects of the RFB Protocol versions 3.3 - 3.8.
파일 보기 프로젝트 열기: nakano531/VncSharpWpf 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
FailedToListen EventHandler

보호된 프로퍼티들

프로퍼티 타입 설명
reader System.IO.BinaryReader
stream NetworkStream
tcpClient System.Net.Sockets.TcpClient
tcpListener System.Net.Sockets.TcpListener
verMajor int
verMinor int
writer System.IO.BinaryWriter
zrleReader ZRLECompressedReader

공개 메소드들

메소드 설명
Close ( ) : void

Closes the connection to the remote host.

Connect ( string host, int port ) : void

Attempt to connectFromClient to a remote VNC Host.

Listen ( string host, int port ) : void

Start to Listen.

ReadByte ( ) : byte

Reads a single Byte value from the server.

ReadBytes ( int count ) : byte[]

Reads the specified number of bytes from the server, taking care of Big- to Little-Endian conversion.

ReadColourMapEntry ( ) : void

Reads 8-bit RGB colour values (or updated values) into the colour map. See RFB Doc v. 3.8 section 6.5.2.

ReadFramebufferUpdate ( ) : int

Reads the number of update rectangles being sent by the server. See RFB Doc v. 3.8 section 6.4.1.

ReadFramebufferUpdateRectHeader ( Rectangle &rectangle, int &encoding ) : void

Reads a rectangle's header information, including its encoding. See RFB Doc v. 3.8 section 6.4.1.

ReadProtocolVersion ( ) : void

Reads VNC Host Protocol Version message (see RFB Doc v. 3.8 section 6.1.1)

ReadSecurityChallenge ( ) : byte[]

When the server uses Security Type 2 (i.e., VNC Authentication), a Challenge/Response mechanism is used to authenticate the user. See RFB Doc v. 3.8 section 6.1.2 and 6.2.2.

ReadSecurityFailureReason ( ) : string

If the server has rejected the connection during Authentication, a reason is given. See RFB Doc v. 3.8 section 6.1.2.

ReadSecurityResult ( ) : uint

When the server uses VNC Authentication, after the Challege/Response, the server sends a status code to indicate whether authentication worked. See RFB Doc v. 3.8 section 6.1.3.

ReadSecurityTypes ( ) : byte[]

Determine the type(s) of authentication that the server supports. See RFB Doc v. 3.8 section 6.1.2.

ReadServerCutText ( ) : string

Reads the text from the Cut Buffer on the server. See RFB Doc v. 3.8 section 6.4.4.

ReadServerInit ( ) : Framebuffer

Reads the server's Initialization message, specifically the remote Framebuffer's properties. See RFB Doc v. 3.8 section 6.1.5.

ReadServerMessageType ( ) : int

Reads the type of message being sent by the server--all messages are prefixed with a message type.

ReadUInt16 ( ) : ushort

Reads a single UInt16 value from the server, taking care of Big- to Little-Endian conversion.

ReadUint32 ( ) : uint

Reads a single UInt32 value from the server, taking care of Big- to Little-Endian conversion.

RfbProtocol ( ) : System
StopListen ( ) : void

Stop Listening.

WriteByte ( byte value ) : void

Writes a single Byte value to the server.

WriteClientCutText ( string text ) : void

Sends text in the client's Cut Buffer to the server. See RFB Doc v. 3.8 section 6.3.7.

WriteClientInitialisation ( bool shared ) : void

Sends an Initialisation message to the server. See RFB Doc v. 3.8 section 6.1.4.

WriteFramebufferUpdateRequest ( ushort x, ushort y, ushort width, ushort height, bool incremental ) : void

Sends a request for an update of the area specified by (x, y, w, h). See RFB Doc v. 3.8 section 6.3.4.

WriteKeyEvent ( uint keysym, bool pressed ) : void

Sends a key press or release to the server. See RFB Doc v. 3.8 section 6.3.5.

WritePointerEvent ( byte buttonMask, Point point ) : void

Sends a mouse movement or button press/release to the server. See RFB Doc v. 3.8 section 6.3.6.

WriteProtocolVersion ( ) : void

Send the Protocol Version supported by the client. Will be highest supported by server (see RFB Doc v. 3.8 section 6.1.1).

WriteSecurityResponse ( byte response ) : void

Sends the encrypted Response back to the server. See RFB Doc v. 3.8 section 6.1.2.

WriteSecurityType ( byte type ) : void

Indicate to the server which type of authentication will be used. See RFB Doc v. 3.8 section 6.1.2.

WriteSetEncodings ( uint encodings ) : void

Tell the server which encodings are supported by the client. See RFB Doc v. 3.8 section 6.3.3.

WriteSetPixelFormat ( Framebuffer buffer ) : void

Sends the format to be used by the server when sending Framebuffer Updates. See RFB Doc v. 3.8 section 6.3.1.

WriteUInt16 ( ushort value ) : void

Writes a single UInt16 value to the server, taking care of Little- to Big-Endian conversion.

WriteUint32 ( uint value ) : void

Writes a single UInt32 value to the server, taking care of Little- to Big-Endian conversion.

보호된 메소드들

메소드 설명
GetBytes ( string text ) : byte[]

Converts a string to bytes for transfer to the server.

GetString ( byte bytes ) : string

Converts a series of bytes to a string.

ReadPadding ( int length ) : void

Reads the specified number of bytes of padding (i.e., garbage bytes) from the server.

WritePadding ( int length ) : void

Writes the specified number of bytes of padding (i.e., garbage bytes) to the server.

비공개 메소드들

메소드 설명
ListenCore ( ) : void

Function for Listening Thread.

SetStreams ( ) : void

Set Streams to valiables.

메소드 상세

Close() 공개 메소드

Closes the connection to the remote host.
public Close ( ) : void
리턴 void

Connect() 공개 메소드

Attempt to connectFromClient to a remote VNC Host.
public Connect ( string host, int port ) : void
host string The IP Address or Host Name of the VNC Host.
port int The Port number on which to connectFromClient. Usually this will be 5900, except in the case that the VNC Host is running on a different Display, in which case the Display number should be added to 5900 to determine the correct port.
리턴 void

GetBytes() 보호된 정적인 메소드

Converts a string to bytes for transfer to the server.
protected static GetBytes ( string text ) : byte[]
text string The text to be converted to bytes.
리턴 byte[]

GetString() 보호된 정적인 메소드

Converts a series of bytes to a string.
protected static GetString ( byte bytes ) : string
bytes byte The Array of Bytes to be converted to a string.
리턴 string

Listen() 공개 메소드

Start to Listen.
public Listen ( string host, int port ) : void
host string
port int
리턴 void

ReadByte() 공개 메소드

Reads a single Byte value from the server.
public ReadByte ( ) : byte
리턴 byte

ReadBytes() 공개 메소드

Reads the specified number of bytes from the server, taking care of Big- to Little-Endian conversion.
public ReadBytes ( int count ) : byte[]
count int The number of bytes to be read.
리턴 byte[]

ReadColourMapEntry() 공개 메소드

Reads 8-bit RGB colour values (or updated values) into the colour map. See RFB Doc v. 3.8 section 6.5.2.
public ReadColourMapEntry ( ) : void
리턴 void

ReadFramebufferUpdate() 공개 메소드

Reads the number of update rectangles being sent by the server. See RFB Doc v. 3.8 section 6.4.1.
public ReadFramebufferUpdate ( ) : int
리턴 int

ReadFramebufferUpdateRectHeader() 공개 메소드

Reads a rectangle's header information, including its encoding. See RFB Doc v. 3.8 section 6.4.1.
public ReadFramebufferUpdateRectHeader ( Rectangle &rectangle, int &encoding ) : void
rectangle System.Drawing.Rectangle The geometry of the rectangle that is about to be sent.
encoding int The encoding used for this rectangle.
리턴 void

ReadPadding() 보호된 메소드

Reads the specified number of bytes of padding (i.e., garbage bytes) from the server.
protected ReadPadding ( int length ) : void
length int The number of bytes of padding to read.
리턴 void

ReadProtocolVersion() 공개 메소드

Reads VNC Host Protocol Version message (see RFB Doc v. 3.8 section 6.1.1)
Thrown if the version of the host is not known or supported.
public ReadProtocolVersion ( ) : void
리턴 void

ReadSecurityChallenge() 공개 메소드

When the server uses Security Type 2 (i.e., VNC Authentication), a Challenge/Response mechanism is used to authenticate the user. See RFB Doc v. 3.8 section 6.1.2 and 6.2.2.
public ReadSecurityChallenge ( ) : byte[]
리턴 byte[]

ReadSecurityFailureReason() 공개 메소드

If the server has rejected the connection during Authentication, a reason is given. See RFB Doc v. 3.8 section 6.1.2.
public ReadSecurityFailureReason ( ) : string
리턴 string

ReadSecurityResult() 공개 메소드

When the server uses VNC Authentication, after the Challege/Response, the server sends a status code to indicate whether authentication worked. See RFB Doc v. 3.8 section 6.1.3.
public ReadSecurityResult ( ) : uint
리턴 uint

ReadSecurityTypes() 공개 메소드

Determine the type(s) of authentication that the server supports. See RFB Doc v. 3.8 section 6.1.2.
public ReadSecurityTypes ( ) : byte[]
리턴 byte[]

ReadServerCutText() 공개 메소드

Reads the text from the Cut Buffer on the server. See RFB Doc v. 3.8 section 6.4.4.
public ReadServerCutText ( ) : string
리턴 string

ReadServerInit() 공개 메소드

Reads the server's Initialization message, specifically the remote Framebuffer's properties. See RFB Doc v. 3.8 section 6.1.5.
public ReadServerInit ( ) : Framebuffer
리턴 Framebuffer

ReadServerMessageType() 공개 메소드

Reads the type of message being sent by the server--all messages are prefixed with a message type.
public ReadServerMessageType ( ) : int
리턴 int

ReadUInt16() 공개 메소드

Reads a single UInt16 value from the server, taking care of Big- to Little-Endian conversion.
public ReadUInt16 ( ) : ushort
리턴 ushort

ReadUint32() 공개 메소드

Reads a single UInt32 value from the server, taking care of Big- to Little-Endian conversion.
public ReadUint32 ( ) : uint
리턴 uint

RfbProtocol() 공개 메소드

public RfbProtocol ( ) : System
리턴 System

StopListen() 공개 메소드

Stop Listening.
public StopListen ( ) : void
리턴 void

WriteByte() 공개 메소드

Writes a single Byte value to the server.
public WriteByte ( byte value ) : void
value byte The UInt32 value to be written.
리턴 void

WriteClientCutText() 공개 메소드

Sends text in the client's Cut Buffer to the server. See RFB Doc v. 3.8 section 6.3.7.
public WriteClientCutText ( string text ) : void
text string The text to be sent to the server.
리턴 void

WriteClientInitialisation() 공개 메소드

Sends an Initialisation message to the server. See RFB Doc v. 3.8 section 6.1.4.
public WriteClientInitialisation ( bool shared ) : void
shared bool True if the server should allow other clients to connectFromClient, otherwise False.
리턴 void

WriteFramebufferUpdateRequest() 공개 메소드

Sends a request for an update of the area specified by (x, y, w, h). See RFB Doc v. 3.8 section 6.3.4.
public WriteFramebufferUpdateRequest ( ushort x, ushort y, ushort width, ushort height, bool incremental ) : void
x ushort The x-position of the area to be updated.
y ushort The y-position of the area to be updated.
width ushort The width of the area to be updated.
height ushort The height of the area to be updated.
incremental bool Indicates whether only changes to the client's data should be sent or the entire desktop.
리턴 void

WriteKeyEvent() 공개 메소드

Sends a key press or release to the server. See RFB Doc v. 3.8 section 6.3.5.
public WriteKeyEvent ( uint keysym, bool pressed ) : void
keysym uint The value of the key pressed, expressed using X Window "keysym" values.
pressed bool
리턴 void

WritePadding() 보호된 메소드

Writes the specified number of bytes of padding (i.e., garbage bytes) to the server.
protected WritePadding ( int length ) : void
length int The number of bytes of padding to write.
리턴 void

WritePointerEvent() 공개 메소드

Sends a mouse movement or button press/release to the server. See RFB Doc v. 3.8 section 6.3.6.
public WritePointerEvent ( byte buttonMask, Point point ) : void
buttonMask byte A bitmask indicating which button(s) are pressed.
point Point The location of the mouse cursor.
리턴 void

WriteProtocolVersion() 공개 메소드

Send the Protocol Version supported by the client. Will be highest supported by server (see RFB Doc v. 3.8 section 6.1.1).
public WriteProtocolVersion ( ) : void
리턴 void

WriteSecurityResponse() 공개 메소드

Sends the encrypted Response back to the server. See RFB Doc v. 3.8 section 6.1.2.
public WriteSecurityResponse ( byte response ) : void
response byte The DES password encrypted challege sent by the server.
리턴 void

WriteSecurityType() 공개 메소드

Indicate to the server which type of authentication will be used. See RFB Doc v. 3.8 section 6.1.2.
public WriteSecurityType ( byte type ) : void
type byte The type of Authentication to be used, 1 (None) or 2 (VNC Authentication).
리턴 void

WriteSetEncodings() 공개 메소드

Tell the server which encodings are supported by the client. See RFB Doc v. 3.8 section 6.3.3.
public WriteSetEncodings ( uint encodings ) : void
encodings uint An array of integers indicating the encoding types supported. The order indicates preference, where the first item is the first preferred.
리턴 void

WriteSetPixelFormat() 공개 메소드

Sends the format to be used by the server when sending Framebuffer Updates. See RFB Doc v. 3.8 section 6.3.1.
public WriteSetPixelFormat ( Framebuffer buffer ) : void
buffer Framebuffer A Framebuffer telling the server how to encode pixel data. Typically this will be the same one sent by the server during initialization.
리턴 void

WriteUInt16() 공개 메소드

Writes a single UInt16 value to the server, taking care of Little- to Big-Endian conversion.
public WriteUInt16 ( ushort value ) : void
value ushort The UInt16 value to be written.
리턴 void

WriteUint32() 공개 메소드

Writes a single UInt32 value to the server, taking care of Little- to Big-Endian conversion.
public WriteUint32 ( uint value ) : void
value uint The UInt32 value to be written.
리턴 void

프로퍼티 상세

FailedToListen 공개적으로 프로퍼티

Raised when Failed To Listen.
public EventHandler FailedToListen
리턴 EventHandler

reader 보호되어 있는 프로퍼티

protected BinaryReader,System.IO reader
리턴 System.IO.BinaryReader

stream 보호되어 있는 프로퍼티

protected NetworkStream stream
리턴 NetworkStream

tcpClient 보호되어 있는 프로퍼티

protected TcpClient,System.Net.Sockets tcpClient
리턴 System.Net.Sockets.TcpClient

tcpListener 보호되어 있는 프로퍼티

protected TcpListener,System.Net.Sockets tcpListener
리턴 System.Net.Sockets.TcpListener

verMajor 보호되어 있는 프로퍼티

protected int verMajor
리턴 int

verMinor 보호되어 있는 프로퍼티

protected int verMinor
리턴 int

writer 보호되어 있는 프로퍼티

protected BinaryWriter,System.IO writer
리턴 System.IO.BinaryWriter

zrleReader 보호되어 있는 프로퍼티

protected ZRLECompressedReader zrleReader
리턴 ZRLECompressedReader