acceptor

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Acceptor

type Acceptor interface {
	ListenAndServe()
	Stop()
	GetAddr() string
	GetConnChan() chan net.Conn
}

Acceptor type interface

type TCPAcceptor

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

TCPAcceptor struct

func NewTCPAcceptor

func NewTCPAcceptor(addr string, certs ...string) *TCPAcceptor

NewTCPAcceptor creates a new instance of tcp acceptor

func (*TCPAcceptor) GetAddr

func (a *TCPAcceptor) GetAddr() string

GetAddr returns the addr the acceptor will listen on

func (*TCPAcceptor) GetConnChan

func (a *TCPAcceptor) GetConnChan() chan net.Conn

GetConnChan gets a connection channel

func (*TCPAcceptor) ListenAndServe

func (a *TCPAcceptor) ListenAndServe()

ListenAndServe using tcp acceptor

func (*TCPAcceptor) ListenAndServeTLS

func (a *TCPAcceptor) ListenAndServeTLS(cert, key string)

ListenAndServeTLS listens using tls

func (*TCPAcceptor) Stop

func (a *TCPAcceptor) Stop()

Stop stops the acceptor

type WSAcceptor

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

WSAcceptor struct

func NewWSAcceptor

func NewWSAcceptor(addr string, certs ...string) *WSAcceptor

NewWSAcceptor returns a new instance of WSAcceptor

func (*WSAcceptor) GetAddr

func (w *WSAcceptor) GetAddr() string

GetAddr returns the addr the acceptor will listen on

func (*WSAcceptor) GetConnChan

func (w *WSAcceptor) GetConnChan() chan net.Conn

GetConnChan gets a connection channel

func (*WSAcceptor) ListenAndServe

func (w *WSAcceptor) ListenAndServe()

ListenAndServe listens and serve in the specified addr

func (*WSAcceptor) ListenAndServeTLS

func (w *WSAcceptor) ListenAndServeTLS(cert, key string)

ListenAndServeTLS listens and serve in the specified addr using tls

func (*WSAcceptor) Stop

func (w *WSAcceptor) Stop()

Stop stops the acceptor

Jump to

Keyboard shortcuts

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