server

package
v1.1.0 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package server 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
	// DetectMinSize default min size for detection
	DetectMinSize int = 20
)

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, e *facenet.Estimator, 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
Package handlers include server handlers
Package handlers include server handlers

Jump to

Keyboard shortcuts

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