Initial QSfera import
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package transport
|
||||
|
||||
import (
|
||||
"net"
|
||||
)
|
||||
|
||||
type netListener struct{}
|
||||
|
||||
// getNetListener Get net.Listener from ListenOptions.
|
||||
func getNetListener(o *ListenOptions) net.Listener {
|
||||
if o.Context == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if l, ok := o.Context.Value(netListener{}).(net.Listener); ok && l != nil {
|
||||
return l
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user