Beam: convenience functions Listen and Connect

These convenience functions expose a familiar face to the unknown and bizarre world of beam networking.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
This commit is contained in:
Solomon Hykes 2014-03-11 17:15:26 -07:00
parent 932149b2a7
commit c008283f8d
2 changed files with 90 additions and 2 deletions

View file

@ -1,10 +1,10 @@
package beam
import (
"syscall"
"fmt"
"net"
"os"
"syscall"
)
// Send sends a new message on conn with data and f as payload and
@ -100,7 +100,6 @@ func sendUnix(conn *net.UnixConn, data []byte, fds ...int) error {
return err
}
func extractFds(oob []byte) (fds []int) {
scms, err := syscall.ParseSocketControlMessage(oob)
if err != nil {