Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 66 for newConn (0.14 sec)

  1. staging/src/k8s.io/apiserver/pkg/util/wsstream/legacy.go

    	IgnoreReceives             = apimachinerywsstream.IgnoreReceives
    	NewDefaultChannelProtocols = apimachinerywsstream.NewDefaultChannelProtocols
    )
    
    type Conn = apimachinerywsstream.Conn
    
    var NewConn = apimachinerywsstream.NewConn
    
    // Aliases for all exported symbols previously in "stream.go"
    type ReaderProtocolConfig = apimachinerywsstream.ReaderProtocolConfig
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 07 18:21:43 UTC 2023
    - 2K bytes
    - Viewed (0)
  2. pkg/test/echo/server/forwarder/http.go

    		return func() (http.RoundTripper, func(), error) {
    			conn := newConn()
    			return conn, closeFn(conn), nil
    		}, noCloseFn
    	}
    
    	// Re-use the same transport for all requests. For HTTP3, this should result
    	// in multiplexing all requests over the same connection.
    	conn := newConn()
    	return func() (http.RoundTripper, func(), error) {
    		return conn, noCloseFn, nil
    	}, closeFn(conn)
    }
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 13:56:46 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  3. src/net/textproto/textproto.go

    // These embedded types carry methods with them;
    // see the documentation of those types for details.
    type Conn struct {
    	Reader
    	Writer
    	Pipeline
    	conn io.ReadWriteCloser
    }
    
    // NewConn returns a new [Conn] using conn for I/O.
    func NewConn(conn io.ReadWriteCloser) *Conn {
    	return &Conn{
    		Reader: Reader{R: bufio.NewReader(conn)},
    		Writer: Writer{W: bufio.NewWriter(conn)},
    		conn:   conn,
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn_test.go

    	return server, serverAddr
    }
    
    func TestRawConn(t *testing.T) {
    	channels := []ChannelType{ReadWriteChannel, ReadWriteChannel, IgnoreChannel, ReadChannel, WriteChannel}
    	conn := NewConn(NewDefaultChannelProtocols(channels))
    
    	s, addr := newServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
    		conn.Open(w, req)
    	}))
    	defer s.Close()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:33:38 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  5. src/net/smtp/smtp_test.go

    	var cmdbuf strings.Builder
    	bcmdbuf := bufio.NewWriter(&cmdbuf)
    	var fake faker
    	fake.ReadWriter = bufio.NewReadWriter(bufio.NewReader(strings.NewReader(server)), bcmdbuf)
    	c := &Client{Text: textproto.NewConn(fake), localName: "localhost"}
    
    	if err := c.helo(); err != nil {
    		t.Fatalf("HELO failed: %s", err)
    	}
    	if err := c.ehlo(); err == nil {
    		t.Fatalf("Expected first EHLO to fail")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn.go

    	selectedProtocol string
    	channels         []*websocketChannel
    	codec            codecType
    	ready            chan struct{}
    	ws               *websocket.Conn
    	timeout          time.Duration
    }
    
    // NewConn creates a WebSocket connection that supports a set of channels. Channels begin each
    // web socket message with a single byte indicating the channel number (0-N). 255 is reserved for
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 19:10:30 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  7. src/net/smtp/smtp.go

    }
    
    // NewClient returns a new [Client] using an existing connection and host as a
    // server name to be used when authenticating.
    func NewClient(conn net.Conn, host string) (*Client, error) {
    	text := textproto.NewConn(conn)
    	_, _, err := text.ReadResponse(220)
    	if err != nil {
    		text.Close()
    		return nil, err
    	}
    	c := &Client{Text: text, conn: conn, serverName: host, localName: "localhost"}
    	_, c.tls = conn.(*tls.Conn)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/util/proxy/websocket.go

    // streams needed to perform an exec or an attach.
    func createWebSocketStreams(req *http.Request, w http.ResponseWriter, opts Options) (*conns, error) {
    	channels := createChannels(opts)
    	conn := wsstream.NewConn(map[string]wsstream.ChannelProtocolConfig{
    		// WebSocket server only supports remote command version 5.
    		constants.StreamProtocolV5Name: {
    			Binary:   true,
    			Channels: channels,
    		},
    	})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 16:28:45 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  9. src/net/http/fcgi/fcgi.go

    type conn struct {
    	mutex    sync.Mutex
    	rwc      io.ReadWriteCloser
    	closeErr error
    	closed   bool
    
    	// to avoid allocations
    	buf bytes.Buffer
    	h   header
    }
    
    func newConn(rwc io.ReadWriteCloser) *conn {
    	return &conn{rwc: rwc}
    }
    
    // Close closes the conn if it is not already closed.
    func (c *conn) Close() error {
    	c.mutex.Lock()
    	defer c.mutex.Unlock()
    	if !c.closed {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 11 18:51:39 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  10. src/net/http/export_test.go

    	NewLoggingConn                    = newLoggingConn
    	ExportAppendTime                  = appendTime
    	ExportRefererForURL               = refererForURL
    	ExportServerNewConn               = (*Server).newConn
    	ExportCloseWriteAndWait           = (*conn).closeWriteAndWait
    	ExportErrRequestCanceled          = errRequestCanceled
    	ExportErrRequestCanceledConn      = errRequestCanceledConn
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:11:57 UTC 2024
    - 8.7K bytes
    - Viewed (0)
Back to top