transport

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2016 License: LGPL-2.1 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConn

func NewConn(baseConn net.Conn, output chan base.SipMessage) *connection

Types

type Listener

type Listener chan base.SipMessage

type Manager

type Manager interface {
	Listen(address string) error
	Send(addr string, message base.SipMessage) error
	Stop()
	GetChannel() Listener
}

func NewManager

func NewManager(transportType string) (m Manager, err error)

type Tcp

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

func NewTcp

func NewTcp(output chan base.SipMessage) (*Tcp, error)

func (*Tcp) GetConn

func (t *Tcp) GetConn(addr string) *connection

Return an existing open socket for the given address, or nil if no such socket exists.

func (*Tcp) Init

func (t *Tcp) Init()

Create a new connection table.

func (*Tcp) IsStreamed

func (tcp *Tcp) IsStreamed() bool

func (*Tcp) Listen

func (tcp *Tcp) Listen(address string) error

func (*Tcp) Notify

func (t *Tcp) Notify(addr string, conn *connection)

Push a connection to the connection table, registered under a specific address. If it is a new connection, start the socket expiry timer. If it is a known connection, restart the timer.

func (*Tcp) Send

func (tcp *Tcp) Send(addr string, msg base.SipMessage) error

func (*Tcp) Stop

func (tcp *Tcp) Stop()

type Udp

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

func NewUdp

func NewUdp(output chan base.SipMessage) (*Udp, error)

func (*Udp) IsStreamed

func (udp *Udp) IsStreamed() bool

func (*Udp) Listen

func (udp *Udp) Listen(address string) error

func (*Udp) Send

func (udp *Udp) Send(addr string, msg base.SipMessage) error

func (*Udp) Stop

func (udp *Udp) Stop()

Jump to

Keyboard shortcuts

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