Be more like a library to support mobile (#247)

This commit is contained in:
Nathan Brown
2020-06-30 13:48:58 -05:00
committed by GitHub
parent 1ea8847085
commit 41578ca971
21 changed files with 477 additions and 69 deletions

View File

@ -1,3 +1,5 @@
// +build !android
package nebula
import (
@ -85,6 +87,10 @@ func NewListener(ip string, port int, multi bool) (*udpConn, error) {
return &udpConn{sysFd: fd}, err
}
func (u *udpConn) Rebind() {
return
}
func (u *udpConn) SetRecvBuffer(n int) error {
return unix.SetsockoptInt(u.sysFd, unix.SOL_SOCKET, unix.SO_RCVBUFFORCE, n)
}