Documentation ¶
Index ¶
- type Conn
- type Server
- func (s *Server) AuthIsSupported(code uint8) bool
- func (s *Server) GetAuth(code uint8) auth.Type
- func (s *Server) GetAuthByName(name string) auth.Type
- func (s *Server) GetEncoding(encs []int32) encodings.Encoding
- func (s *Server) GetEventHandlerMap() map[uint8]events.Event
- func (s *Server) Serve(ln net.Listener) error
- func (s *Server) ServeWebsockify(ln net.Listener) error
- func (s *Server) TightIsEnabled() bool
- func (s *Server) VNCAuthIsEnabled() bool
- type ServerOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn represents a client connection.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents an RFB server. A channel is exposed for handling incoming client connections.
func NewServer ¶
func NewServer(opts *ServerOpts) *Server
NewServer creates a new RFB server with an initial width and height.
func (*Server) AuthIsSupported ¶
AuthIsSupported returns true if the given auth type is supported.
func (*Server) GetAuthByName ¶
GetAuthByName returns the auth interface by the given name.
func (*Server) GetEncoding ¶
GetEncoding will iterate the requested encodings and return the best match that can be served. If none of the requested encodings are supported (should never happen as at least RAW is required by RFC) this function returns nil.
func (*Server) GetEventHandlerMap ¶
GetEventHandlerMap returns a map that can be used for handling events on an rfb connection.
func (*Server) Serve ¶
Serve binds the RFB server to the given listener and starts serving connections.
func (*Server) ServeWebsockify ¶
ServeWebsockify will serve websockify connections on the given host and port.
func (*Server) TightIsEnabled ¶
TightIsEnabled returns true if TightSecurity is enabled. This is used to determine if capabilities being mutated by the user also need to be updated here.
func (*Server) VNCAuthIsEnabled ¶
VNCAuthIsEnabled returns true if VNCAuth is enabled on the server. This is used to signal the need to generate (or, in the future, read in) the server password.