C# Class RemoteViewing.Vnc.Server.VncServerSession

Serves a VNC client with framebuffer information and receives keyboard and mouse interactions.
显示文件 Open project: qmfrederik/remoteviewing Class Usage Examples

Public Methods

Method Description
Bell ( ) : void

Tells the client to play a bell sound.

Close ( ) : void

Closes the connection with the remote client.

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

Starts a session with a VNC client.

FramebufferChanged ( ) : void

Notifies the framebuffer update thread to check for recent changes.

FramebufferManualBeginUpdate ( ) : void

Begins a manual framebuffer update. Do not call this method without holding VncServerSession.FramebufferUpdateRequestLock.

FramebufferManualCopyRegion ( VncRectangle target, int sourceX, int sourceY ) : void

Queues an update corresponding to one region of the framebuffer being copied to another.

Do not call this method without holding VncServerSession.FramebufferUpdateRequestLock.

FramebufferManualEndUpdate ( ) : bool

Completes a manual framebuffer update.

Do not call this method without holding VncServerSession.FramebufferUpdateRequestLock.

FramebufferManualInvalidate ( VncRectangle region ) : void

Queues an update for the specified region. Do not call this method without holding VncServerSession.FramebufferUpdateRequestLock.

FramebufferManualInvalidateAll ( ) : void

Queues an update for the entire framebuffer. Do not call this method without holding VncServerSession.FramebufferUpdateRequestLock.

SendLocalClipboardChange ( string data ) : void

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

SetFramebufferSource ( IVncFramebufferSource source ) : void

Sets the framebuffer source.

VncServerSession ( ) : RemoteViewing.Logging

Initializes a new instance of the VncServerSession class.

Protected Methods

Method Description
OnClosed ( ) : void

Raises the Closed event.

OnConnected ( ) : void

Raises the Connected event.

OnConnectionFailed ( ) : void

Raises the ConnectionFailed event.

OnCreatingDesktop ( CreatingDesktopEventArgs e ) : void

Raises the CreatingDesktop event.

OnFramebufferCapturing ( ) : void

Raises the FramebufferCapturing event.

OnFramebufferUpdating ( FramebufferUpdatingEventArgs e ) : void

Raises the FramebufferUpdating event.

OnKeyChanged ( KeyChangedEventArgs e ) : void

Raises the KeyChanged event.

OnPasswordProvided ( PasswordProvidedEventArgs e ) : void

Raises the PasswordProvided event.

OnPointerChanged ( PointerChangedEventArgs e ) : void

Raises the PointerChanged event.

OnRemoteClipboardChanged ( RemoteClipboardChangedEventArgs e ) : void

Raises the RemoteClipboardChanged event.

Private Methods

Method Description
AddRegion ( VncRectangle region, VncEncoding encoding, byte contents ) : void
FramebufferSendChanges ( ) : bool
HandleFramebufferUpdateRequest ( ) : void
HandleKeyEvent ( ) : void
HandlePointerEvent ( ) : void
HandleReceiveClipboardData ( ) : void
HandleSetEncodings ( ) : void
HandleSetPixelFormat ( ) : void
InitFramebufferEncoder ( ) : void
NegotiateDesktop ( ) : void
NegotiateEncodings ( ) : void
NegotiateSecurity ( AuthenticationMethod methods ) : void
NegotiateVersion ( AuthenticationMethod &methods ) : void
ThreadMain ( ) : void

Method Details

Bell() public method

Tells the client to play a bell sound.
public Bell ( ) : void
return void

Close() public method

Closes the connection with the remote client.
public Close ( ) : void
return void

Connect() public method

Starts a session with a VNC client.
public Connect ( Stream stream, VncServerSessionOptions options = null ) : void
stream Stream The stream containing the connection.
options VncServerSessionOptions Session options, if any.
return void

FramebufferChanged() public method

Notifies the framebuffer update thread to check for recent changes.
public FramebufferChanged ( ) : void
return void

FramebufferManualBeginUpdate() public method

Begins a manual framebuffer update. Do not call this method without holding VncServerSession.FramebufferUpdateRequestLock.
public FramebufferManualBeginUpdate ( ) : void
return void

FramebufferManualCopyRegion() public method

Queues an update corresponding to one region of the framebuffer being copied to another.
Do not call this method without holding VncServerSession.FramebufferUpdateRequestLock.
public FramebufferManualCopyRegion ( VncRectangle target, int sourceX, int sourceY ) : void
target VncRectangle /// The updated . ///
sourceX int /// The X coordinate of the source. ///
sourceY int /// The Y coordinate of the source. ///
return void

FramebufferManualEndUpdate() public method

Completes a manual framebuffer update.
Do not call this method without holding VncServerSession.FramebufferUpdateRequestLock.
public FramebufferManualEndUpdate ( ) : bool
return bool

FramebufferManualInvalidate() public method

Queues an update for the specified region. Do not call this method without holding VncServerSession.FramebufferUpdateRequestLock.
public FramebufferManualInvalidate ( VncRectangle region ) : void
region VncRectangle The region to invalidate.
return void

FramebufferManualInvalidateAll() public method

Queues an update for the entire framebuffer. Do not call this method without holding VncServerSession.FramebufferUpdateRequestLock.
public FramebufferManualInvalidateAll ( ) : void
return void

OnClosed() protected method

Raises the Closed event.
protected OnClosed ( ) : void
return void

OnConnected() protected method

Raises the Connected event.
protected OnConnected ( ) : void
return void

OnConnectionFailed() protected method

Raises the ConnectionFailed event.
protected OnConnectionFailed ( ) : void
return void

OnCreatingDesktop() protected method

Raises the CreatingDesktop event.
protected OnCreatingDesktop ( CreatingDesktopEventArgs e ) : void
e CreatingDesktopEventArgs /// The event arguments. ///
return void

OnFramebufferCapturing() protected method

Raises the FramebufferCapturing event.
protected OnFramebufferCapturing ( ) : void
return void

OnFramebufferUpdating() protected method

Raises the FramebufferUpdating event.
protected OnFramebufferUpdating ( FramebufferUpdatingEventArgs e ) : void
e FramebufferUpdatingEventArgs /// The event arguments. ///
return void

OnKeyChanged() protected method

Raises the KeyChanged event.
protected OnKeyChanged ( KeyChangedEventArgs e ) : void
e KeyChangedEventArgs /// The event arguments. ///
return void

OnPasswordProvided() protected method

Raises the PasswordProvided event.
protected OnPasswordProvided ( PasswordProvidedEventArgs e ) : void
e PasswordProvidedEventArgs /// The event arguments. ///
return void

OnPointerChanged() protected method

Raises the PointerChanged event.
protected OnPointerChanged ( PointerChangedEventArgs e ) : void
e PointerChangedEventArgs /// The event arguments. ///
return void

OnRemoteClipboardChanged() protected method

Raises the RemoteClipboardChanged event.
protected OnRemoteClipboardChanged ( RemoteClipboardChangedEventArgs e ) : void
e RemoteClipboardChangedEventArgs /// The event arguments. ///
return void

SendLocalClipboardChange() public method

Notifies the client 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.
return void

SetFramebufferSource() public method

Sets the framebuffer source.
public SetFramebufferSource ( IVncFramebufferSource source ) : void
source IVncFramebufferSource The framebuffer source, or if you intend to handle the framebuffer manually.
return void

VncServerSession() public method

Initializes a new instance of the VncServerSession class.
public VncServerSession ( ) : RemoteViewing.Logging
return RemoteViewing.Logging