client

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const FFMPEG_TO_FLV = "FFmpeg to FLV"
View Source
const REGIST_STATUS_FATIL = "0"
View Source
const REGIST_STATUS_OK = "1"
View Source
const SIP_STATUS_OFF = "OFF"
View Source
const SIP_STATUS_ON = "ON"

Variables

This section is empty.

Functions

This section is empty.

Types

type SipClient

type SipClient struct {
	*transaction.Core `json:"-"`
	ID                string

	LocalIp string

	RegisterTime    time.Time
	UpdateTime      time.Time
	LastKeepaliveAt time.Time
	TryCnt          uint
	Done            chan struct{}
	MinPort         uint16
	MaxPort         uint16
	Status          string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *transaction.Config) (*SipClient, error)

func (*SipClient) CreateMessage added in v1.1.3

func (c *SipClient) CreateMessage(mehod sip.Method, body string) *sip.Message

func (*SipClient) SetUp

func (c *SipClient) SetUp(handle SipHandleFunc) error

func (*SipClient) UnRegister added in v1.2.5

func (c *SipClient) UnRegister()

type SipHandleFunc added in v1.1.2

type SipHandleFunc interface {
	HandleRegister(req *sip.Request, tx *transaction.GBTx)
	HandleInvite(req *sip.Request, tx *transaction.GBTx)
	HandleMessage(req *sip.Request, tx *transaction.GBTx)
	HandleAck(req *sip.Request, tx *transaction.GBTx)
	HandleByte(req *sip.Request, tx *transaction.GBTx)
	HandleSubsribe(req *sip.Request, tx *transaction.GBTx)
	KeepLiveCall(deviceId, status string)
	RegisterCall(deviceId, status string)
}

type SipServer added in v1.1.6

type SipServer struct {
	*transaction.Core `json:"-"`
	// contains filtered or unexported fields
}

func NewServer added in v1.1.6

func NewServer(config *transaction.Config) (*SipServer, error)

func (*SipServer) SetUp added in v1.1.6

func (c *SipServer) SetUp(handle SipServerHandleFunc) error

type SipServerHandleFunc added in v1.1.6

type SipServerHandleFunc interface {
	HandleRegister(req *sip.Request, tx *transaction.GBTx)
	HandleInvite(req *sip.Request, tx *transaction.GBTx)
	HandleMessage(req *sip.Request, tx *transaction.GBTx)
	HandleAck(req *sip.Request, tx *transaction.GBTx)
	HandleNotify(req *sip.Request, tx *transaction.GBTx)
	HandleByte(req *sip.Request, tx *transaction.GBTx)
}

Jump to

Keyboard shortcuts

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