server

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package service implement server

Index

Constants

View Source
const (
	// FrameWidth defines default frame width
	FrameWidth float64 = 640
	// FrameHeight defines default frame height
	FrameHeight float64 = 480
	// Delay defines default delay between frames in milliseconds
	Delay int = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents server

func New

func New(bind string, net *facenet.Instance, cam *camera.Camera) *Server

New returns new Server for binding address, facenet instance and camera

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

ListenAndServe listens on the TCP address and serves requests.

func (*Server) SetDelay

func (s *Server) SetDelay(delay int)

SetDelay set delay between two frames in milliseconds

func (*Server) SetFrameSize

func (s *Server) SetFrameSize(width float64, height float64)

SetFrameSize set frame size for display

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Shutdown to shutdown server

func (*Server) Start

func (s *Server) Start() error

Start to start server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL