Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TransportProtocolTCP (0.15 sec)

  1. pilot/pkg/networking/networking.go

    		return ListenerProtocolAuto
    	}
    }
    
    type TransportProtocol uint8
    
    const (
    	// TransportProtocolTCP is a TCP listener
    	TransportProtocolTCP = iota
    	// TransportProtocolQUIC is a QUIC listener
    	TransportProtocolQUIC
    )
    
    func (tp TransportProtocol) String() string {
    	switch tp {
    	case TransportProtocolTCP:
    		return "tcp"
    	case TransportProtocolQUIC:
    		return "quic"
    	}
    	return "unknown"
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Aug 18 09:42:04 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  2. pilot/pkg/networking/networking_test.go

    			}
    		})
    	}
    }
    
    func TestString(t *testing.T) {
    	tests := []struct {
    		name  string
    		value uint
    		want  string
    	}{
    		{
    			"test String method for tcp transport protocol",
    			TransportProtocolTCP,
    			"tcp",
    		},
    		{
    			"test String method for quic transport protocol",
    			TransportProtocolQUIC,
    			"quic",
    		},
    		{
    			"test String method for invalid transport protocol",
    			3,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 01 02:46:15 UTC 2023
    - 2.5K bytes
    - Viewed (0)
Back to top