All Downloads are FREE. Search and download functionalities are using the official Maven repository.

vendor.github.com.pion.sctp.control_queue.go Maven / Gradle / Ivy

There is a newer version: 2.9.1
Show newest version
package sctp

// control queue

type controlQueue struct {
	queue []*packet
}

func newControlQueue() *controlQueue {
	return &controlQueue{queue: []*packet{}}
}

func (q *controlQueue) push(c *packet) {
	q.queue = append(q.queue, c)
}

func (q *controlQueue) pushAll(packets []*packet) {
	q.queue = append(q.queue, packets...)
}

func (q *controlQueue) popAll() []*packet {
	packets := q.queue
	q.queue = []*packet{}
	return packets
}

func (q *controlQueue) size() int {
	return len(q.queue)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy