// NewSCMEndpoint creates a new SCMConnectedEndpoint backed by a host fd that
// was passed through a Unix socket.
//
// The caller is responsible for calling Init(). Additionaly, Release needs to
// be called twice because ConnectedEndpoint is both a transport.Receiver and
// transport.ConnectedEndpoint.
NewSCMEndpoint creates a new SCMConnectedEndpoint backed by a host fd that
was passed through a Unix socket.

The caller is responsible for calling Init(). Additionaly, Release needs to
be called twice because ConnectedEndpoint is both a transport.Receiver and
transport.ConnectedEndpoint.
// NewSCMEndpoint creates a new SCMConnectedEndpoint backed by a host fd that // was passed through a Unix socket . // // The caller is responsible for calling Init () . Additionaly Release needs to // be called twice because ConnectedEndpoint is both a transport . Receiver and // transport . ConnectedEndpoint .
func NewSCMEndpoint(ctx context.Context, hostFD int, queue *waiter.Queue, addr string) (*SCMConnectedEndpoint, *syserr.Error) {
	e := SCMConnectedEndpoint{
		ConnectedEndpoint: ConnectedEndpoint{
			fd:   hostFD,
			addr: addr,
		},
		queue: queue,
	}
	if err := e.init(); err != nil {
		return nil, err
	}
	e.IncRef()
	return &e, nil
}
func NewSCMEndpoint ( ctx context . Context , hostFD int , queue * waiter . Queue , addr string ) ( * SCMConnectedEndpoint , * syserr . Error ) { e := SCMConnectedEndpoint { ConnectedEndpoint : ConnectedEndpoint { fd : hostFD , addr : addr , } , queue : queue , } if err := e . init ( ) ; err != nil { return nil , err } e . IncRef ( ) return & e , nil }
NewSCMEndpoint creates a new SCMConnectedEndpoint backed by a host fd that
was passed through a Unix socket.
NewSCMEndpoint creates a new SCMConnectedEndpoint backed by a host fd that was passed through a Unix socket .
// e starts off with a single reference. We need two.