MCPcopy Create free account
hub / github.com/encodeous/nylon / flushInboundQueue

Method flushInboundQueue

polyamide/device/channels.go:90–104  ·  view source on GitHub ↗
(q *autodrainingInboundQueue)

Source from the content-addressed store, hash-verified

88}
89
90func (device *Device) flushInboundQueue(q *autodrainingInboundQueue) {
91 for {
92 select {
93 case elemsContainer := <-q.c:
94 elemsContainer.Lock()
95 for _, elem := range elemsContainer.elems {
96 device.PutMessageBuffer(elem.buffer)
97 device.PutInboundElement(elem)
98 }
99 device.PutInboundElementsContainer(elemsContainer)
100 default:
101 return
102 }
103 }
104}
105
106type autodrainingOutboundQueue struct {
107 c chan *QueueOutboundElementsContainer

Callers 1

StartMethod · 0.80

Implementers 4

NativeTunpolyamide/tun/tun_linux.go
netTunpolyamide/tun/netstack/tun.go
chTunpolyamide/tun/tuntest/tuntest.go
fakeTUNDeviceSizedpolyamide/device/device_test.go

Calls 3

PutMessageBufferMethod · 0.95
PutInboundElementMethod · 0.95

Tested by

no test coverage detected