Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for makeZeroSubHandlerID (0.19 sec)

  1. internal/grid/manager.go

    		return fmt.Errorf("handler %v, subroute:%v: %w", id.String(), s, ErrHandlerAlreadyExists)
    	}
    	m.handlers.subSingle[subID] = h
    	// Copy so clients can also pick it up for other subpaths.
    	m.handlers.subSingle[makeZeroSubHandlerID(id)] = h
    	return nil
    }
    
    /*
    // RegisterStateless will register a stateless handler that serves
    // []byte -> stream of ([]byte, error) requests.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  2. internal/grid/connection.go

    	if !h.valid() {
    		return nil, ErrUnknownHandler
    	}
    	if c.State() != StateConnected {
    		return nil, ErrDisconnected
    	}
    	handler := c.handlers.subStreams[makeZeroSubHandlerID(h)]
    	if handler == nil {
    		if debugPrint {
    			fmt.Println("want", makeZeroSubHandlerID(h), c.route, "got", c.handlers.subStreams)
    		}
    		return nil, ErrUnknownHandler
    	}
    
    	var requests chan []byte
    	var responses chan Response
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 46.7K bytes
    - Viewed (0)
  3. internal/grid/handlers.go

    	s[0] = byte(id)
    	s[1] = 0 // Reserved
    	return s
    }
    
    func (s *subHandlerID) String() string {
    	if s == nil {
    		return ""
    	}
    	return hex.EncodeToString(s[:])
    }
    
    func makeZeroSubHandlerID(id HandlerID) subHandlerID {
    	return subHandlerID{byte(id)}
    }
    
    type handlers struct {
    	single    [handlerLast]SingleHandlerFn
    	stateless [handlerLast]*StatelessHandler
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 09 16:58:30 UTC 2024
    - 27.7K bytes
    - Viewed (0)
Back to top