mirror of
https://github.com/syntrex-lab/gomcp.git
synced 2026-04-29 14:26:22 +02:00
18 lines
335 B
Go
18 lines
335 B
Go
//go:build !windows
|
|
|
|
package ipc
|
|
|
|
import (
|
|
"net"
|
|
"time"
|
|
)
|
|
|
|
// listen creates a Unix Domain Socket listener.
|
|
func listen(path string) (net.Listener, error) {
|
|
return net.Listen("unix", path)
|
|
}
|
|
|
|
// dial connects to a Unix Domain Socket.
|
|
func dial(path string) (net.Conn, error) {
|
|
return net.DialTimeout("unix", path, 2*time.Second)
|
|
}
|