2018-05-24 02:49:45 +03:00
|
|
|
// Copyright 2018 Joshua J Baker. All rights reserved.
|
2017-11-02 18:08:18 +03:00
|
|
|
// Use of this source code is governed by an MIT-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2017-10-28 22:23:13 +03:00
|
|
|
// +build !darwin,!netbsd,!freebsd,!openbsd,!dragonfly,!linux
|
2017-10-26 23:43:31 +03:00
|
|
|
|
2017-10-29 00:58:59 +03:00
|
|
|
package evio
|
2017-10-26 23:43:31 +03:00
|
|
|
|
2018-05-24 02:49:45 +03:00
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
"net"
|
|
|
|
"os"
|
|
|
|
)
|
2017-10-26 23:43:31 +03:00
|
|
|
|
|
|
|
func (ln *listener) close() {
|
|
|
|
if ln.ln != nil {
|
|
|
|
ln.ln.Close()
|
|
|
|
}
|
2017-11-14 21:43:15 +03:00
|
|
|
if ln.pconn != nil {
|
|
|
|
ln.pconn.Close()
|
|
|
|
}
|
2017-10-26 23:43:31 +03:00
|
|
|
if ln.network == "unix" {
|
|
|
|
os.RemoveAll(ln.addr)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-24 02:49:45 +03:00
|
|
|
func (ln *listener) system() error {
|
2017-10-26 23:43:31 +03:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-05-24 02:49:45 +03:00
|
|
|
func serve(events Events, listeners []*listener) error {
|
2018-06-11 18:40:29 +03:00
|
|
|
return stdserve(events, listeners)
|
2018-05-24 02:49:45 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func reuseportListenPacket(proto, addr string) (l net.PacketConn, err error) {
|
|
|
|
return nil, errors.New("reuseport is not available")
|
|
|
|
}
|
|
|
|
|
|
|
|
func reuseportListen(proto, addr string) (l net.Listener, err error) {
|
|
|
|
return nil, errors.New("reuseport is not available")
|
2017-10-26 23:43:31 +03:00
|
|
|
}
|