Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for serveConn (0.81 sec)

  1. src/net/rpc/jsonrpc/server.go

    	}
    	return c.enc.Encode(resp)
    }
    
    func (c *serverCodec) Close() error {
    	return c.c.Close()
    }
    
    // ServeConn runs the JSON-RPC server on a single connection.
    // ServeConn blocks, serving the connection until the client hangs up.
    // The caller typically invokes ServeConn in a go statement.
    func ServeConn(conn io.ReadWriteCloser) {
    	rpc.ServeCodec(NewServerCodec(conn))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  2. src/net/rpc/server.go

    		return nil
    	}
    	c.closed = true
    	return c.rwc.Close()
    }
    
    // ServeConn runs the server on a single connection.
    // ServeConn blocks, serving the connection until the client hangs up.
    // The caller typically invokes ServeConn in a go statement.
    // ServeConn uses the gob wire format (see package gob) on the
    // connection. To use an alternate codec, use [ServeCodec].
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  3. src/net/rpc/jsonrpc/all_test.go

    	(*reply)[0] = i
    	return nil
    }
    
    func init() {
    	rpc.Register(new(Arith))
    	rpc.Register(BuiltinTypes{})
    }
    
    func TestServerNoParams(t *testing.T) {
    	cli, srv := net.Pipe()
    	defer cli.Close()
    	go ServeConn(srv)
    	dec := json.NewDecoder(cli)
    
    	fmt.Fprintf(cli, `{"method": "Arith.Add", "id": "123"}`)
    	var resp ArithAddResp
    	if err := dec.Decode(&resp); err != nil {
    		t.Fatalf("Decode after no params: %s", err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 01:09:53 UTC 2022
    - 7.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper_test.go

    					if isClosed() {
    						return
    					}
    
    					t.Errorf("error accepting connection: %s", err)
    				}
    
    				if err := proxyHandler.ServeConn(conn); err != nil && !shoulderror {
    					// If the connection request is closed before the channel is closed
    					// the test will fail with a ServeConn error. Since the test only return
    					// early if expects shouldError=true, the channel is closed at the end of
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:33:38 UTC 2023
    - 32.7K bytes
    - Viewed (0)
  5. src/internal/godebug/godebug.go

    //
    // In typical usage, code should declare a Setting as a global
    // and then call Value each time the current setting value is needed:
    //
    //	var http2server = godebug.New("http2server")
    //
    //	func ServeConn(c net.Conn) {
    //		if http2server.Value() == "0" {
    //			disallow HTTP/2
    //			...
    //		}
    //		...
    //	}
    //
    // Each time a non-default setting causes a change in program behavior,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 09 14:19:39 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  6. src/net/rpc/server_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	c1 := <-ch
    	if c1 == nil {
    		t.Fatal(err)
    	}
    
    	newServer := NewServer()
    	newServer.Register(new(Arith))
    	go newServer.ServeConn(c1)
    
    	args := &Args{7, 8}
    	reply := new(Reply)
    	client := NewClient(c)
    	err = client.Call("Arith.Add", args, reply)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 18 05:23:29 UTC 2023
    - 19K bytes
    - Viewed (0)
  7. src/net/http/h2_bundle.go

    // the Request.TLS field in Handlers.
    //
    // ServeConn does not support h2c by itself. Any h2c support must be
    // implemented in terms of providing a suitably-behaving net.Conn.
    //
    // The opts parameter is optional. If nil, default values are used.
    func (s *http2Server) ServeConn(c net.Conn, opts *http2ServeConnOpts) {
    	s.serveConn(c, opts, nil)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 364.1K bytes
    - Viewed (0)
  8. src/net/http/httputil/persist.go

    // should not call Hijack while [ServerConn.Read] or [ServerConn.Write] is in progress.
    func (sc *ServerConn) Hijack() (net.Conn, *bufio.Reader) {
    	sc.mu.Lock()
    	defer sc.mu.Unlock()
    	c := sc.c
    	r := sc.r
    	sc.c = nil
    	sc.r = nil
    	return c, r
    }
    
    // Close calls [ServerConn.Hijack] and then also closes the underlying connection.
    func (sc *ServerConn) Close() error {
    	c, _ := sc.Hijack()
    	if c != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*ProxyRequest).SetXForwarded", Method, 20},
    		{"(*ReverseProxy).ServeHTTP", Method, 0},
    		{"(*ServerConn).Close", Method, 0},
    		{"(*ServerConn).Hijack", Method, 0},
    		{"(*ServerConn).Pending", Method, 0},
    		{"(*ServerConn).Read", Method, 0},
    		{"(*ServerConn).Write", Method, 0},
    		{"BufferPool", Type, 6},
    		{"ClientConn", Type, 0},
    		{"DumpRequest", Func, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  10. src/log/syslog/syslog_unix.go

    package syslog
    
    import (
    	"errors"
    	"net"
    )
    
    // unixSyslog opens a connection to the syslog daemon running on the
    // local machine using a Unix domain socket.
    
    func unixSyslog() (conn serverConn, err error) {
    	logTypes := []string{"unixgram", "unix"}
    	logPaths := []string{"/dev/log", "/var/run/syslog", "/var/run/log"}
    	for _, network := range logTypes {
    		for _, path := range logPaths {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 758 bytes
    - Viewed (0)
Back to top