// BoundEndpointAt implements vfs.FilesystemImpl.BoundEndpointAt.
BoundEndpointAt implements vfs.FilesystemImpl.BoundEndpointAt.
// BoundEndpointAt implements vfs . FilesystemImpl . BoundEndpointAt .
func (fs *filesystem) BoundEndpointAt(ctx context.Context, rp *vfs.ResolvingPath, opts vfs.BoundEndpointOptions) (transport.BoundEndpoint, error) {
	fs.mu.RLock()
	defer fs.mu.RUnlock()
	d, err := resolveLocked(ctx, rp)
	if err != nil {
		return nil, err
	}
	if err := d.inode.checkPermissions(rp.Credentials(), vfs.MayWrite); err != nil {
		return nil, err
	}
	switch impl := d.inode.impl.(type) {
	case *socketFile:
		if impl.ep == nil {
			return nil, syserror.ECONNREFUSED
		}
		return impl.ep, nil
	default:
		return nil, syserror.ECONNREFUSED
	}
}
func ( fs * filesystem ) BoundEndpointAt ( ctx context . Context , rp * vfs . ResolvingPath , opts vfs . BoundEndpointOptions ) ( transport . BoundEndpoint , error ) { fs . mu . RLock ( ) defer fs . mu . RUnlock ( ) d , err := resolveLocked ( ctx , rp ) if err != nil { return nil , err } if err := d . inode . checkPermissions ( rp . Credentials ( ) , vfs . MayWrite ) ; err != nil { return nil , err } switch impl := d . inode . impl . ( type ) { case * socketFile : if impl . ep == nil { return nil , syserror . ECONNREFUSED } return impl . ep , nil default : return nil , syserror . ECONNREFUSED } }
BoundEndpointAt implements vfs.FilesystemImpl.BoundEndpointAt.
BoundEndpointAt implements vfs . FilesystemImpl . BoundEndpointAt .