Documentation ¶
Index ¶
- func CaptureScreen(index int) (*image.RGBA, error)
- func CreateRegistration(host, user string) ([]byte, error)
- func CreateRequest(reqtype uploadpb.ClientRequest_RequestType, message protoreflect.ProtoMessage) ([]byte, error)
- func CreateResponse(restype uploadpb.ServerResponse_MessageType) ([]byte, error)
- func CreateUpload(images [][]byte) ([]byte, error)
- func DecodeImage(encimg []byte) ([]byte, error)
- func EncodeImage(img []byte) ([]byte, error)
- func GetScreenCount() int
- func Init()
- func ReadCommand(conn net.Conn, datapipe chan []byte)
- func ReadConnBytes(count uint64, conn net.Conn) ([]byte, error)
- func SendMessage(msg []byte, conn net.Conn) error
- type RegisteredClient
- type Registration
- type Server
- func (server *Server) AddClientListener(address string, ln *func()) error
- func (server *Server) GetClient(address string) *RegisteredClient
- func (server *Server) GetClients() map[string]*RegisteredClient
- func (server *Server) RemoveClientListener(address string, ln *func()) error
- func (server *Server) Start(quit chan int)
- type Session
- type WebServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRegistration ¶
Create a registration message
func CreateRequest ¶
func CreateRequest(reqtype uploadpb.ClientRequest_RequestType, message protoreflect.ProtoMessage) ([]byte, error)
Create a client request container with a message
func CreateResponse ¶
func CreateResponse(restype uploadpb.ServerResponse_MessageType) ([]byte, error)
Create a server response container with a message
func CreateUpload ¶
Create an image upload message
func ReadCommand ¶
Accept and process requests from other end of socket
func ReadConnBytes ¶
Helper function to read a certain amount of data into a buffer
Types ¶
type RegisteredClient ¶
type Registration ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AddClientListener ¶
Register a listener for client image updates
func (*Server) GetClient ¶
func (server *Server) GetClient(address string) *RegisteredClient
Access a single client
func (*Server) GetClients ¶
func (server *Server) GetClients() map[string]*RegisteredClient
Provide access to client list
func (*Server) RemoveClientListener ¶
Remove a registered listener to cleanup
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func NewSession(address string, fps int, registration Registration) *Session
Create a new session that automatically connects to the server
type WebServer ¶
type WebServer struct {
// contains filtered or unexported fields
}
Runs a web server front-end for the monitor server backend
func NewWebServer ¶
Create a web server
Source Files ¶
Click to show internal directories.
Click to hide internal directories.