server

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Express *express.Express

	// Socket.io client.
	Io *socket.Server
	// contains filtered or unexported fields
}

func NewServer

func NewServer(_options *options.Config) *Server

Create a new server instance.

func (*Server) Close added in v1.1.0

func (serv *Server) Close() error

Close

func (*Server) GetPort

func (serv *Server) GetPort() string

Sanitize the port string from any extra characters

func (*Server) Init

func (serv *Server) Init() (*socket.Server, error)

Start the Socket.io server.

func (*Server) Secure

func (serv *Server) Secure() error

Load SSL 'key' & 'cert' files if https is enabled.

func (*Server) ServerProtocol

func (serv *Server) ServerProtocol() error

Select the http protocol to run on.

Jump to

Keyboard shortcuts

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