mirror of
https://github.com/linka-cloud/grpc.git
synced 2025-11-24 05:03:16 +00:00
15 lines
237 B
Go
15 lines
237 B
Go
package service
|
|
|
|
import (
|
|
"net"
|
|
|
|
"github.com/Microsoft/go-winio"
|
|
)
|
|
|
|
func listen(network, address string) (net.Listener, error) {
|
|
if network == "pipe" {
|
|
return winio.ListenPipe(address, nil)
|
|
}
|
|
return net.Listen(network, address)
|
|
}
|