Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for Conn (0.17 sec)

  1. cni/pkg/pluginlistener/listener_test.go

    	}
    	defer l.Close()
    	conn, err := connect(f)
    	if err != nil {
    		t.Fatalf("failed to connect %v", err)
    	}
    	conn.Close()
    }
    
    func connect(socket string) (*grpc.ClientConn, error) {
    	var opts []grpc.DialOption
    
    	opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(func(ctx context.Context, addr string) (net.Conn, error) {
    		var d net.Dialer
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Feb 08 21:58:32 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  2. internal/event/target/redis.go

    		Dial: func() (redis.Conn, error) {
    			conn, err := redis.Dial("tcp", args.Addr.String())
    			if err != nil {
    				return nil, err
    			}
    
    			if args.Password != "" {
    				if args.User != "" {
    					if _, err = conn.Do("AUTH", args.User, args.Password); err != nil {
    						conn.Close()
    						return nil, err
    					}
    				} else {
    					if _, err = conn.Do("AUTH", args.Password); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 19 04:37:54 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  3. internal/deadlineconn/deadlineconn.go

    	return c
    }
    
    // WithWriteDeadline sets a new write side net.Conn deadline.
    func (c *DeadlineConn) WithWriteDeadline(d time.Duration) *DeadlineConn {
    	c.writeDeadline = d
    	return c
    }
    
    // New - creates a new connection object wrapping net.Conn with deadlines.
    func New(c net.Conn) *DeadlineConn {
    	return &DeadlineConn{
    		Conn: c,
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Nov 05 18:09:21 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  4. internal/http/listener.go

    }
    
    // Accept - reads from httpListener.acceptCh for one of previously accepted TCP connection and returns the same.
    func (listener *httpListener) Accept() (conn net.Conn, err error) {
    	select {
    	case result, ok := <-listener.acceptCh:
    		if ok {
    			return deadlineconn.New(result.conn).
    				WithReadDeadline(listener.opts.ClientReadTimeout).
    				WithWriteDeadline(listener.opts.ClientWriteTimeout), result.err
    		}
    	case <-listener.ctx.Done():
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/core/net/JarURLConnectionUtil.java

         * {@link JarURLConnection#getJarFile()}の例外処理をラップするメソッドです。
         *
         * @param conn
         *            {@link JarURLConnection}。{@literal null}であってはいけません
         * @return {@link JarFile}
         */
        public static JarFile getJarFile(final JarURLConnection conn) {
            assertArgumentNotNull("conn", conn);
    
            try {
                return conn.getJarFile();
            } catch (final IOException e) {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  6. tests/connpool_test.go

    		},
    	}
    
    	defer func() {
    		if !reflect.DeepEqual(conn.got, conn.expect) {
    			t.Errorf("expect %#v but got %#v", conn.expect, conn.got)
    		}
    	}()
    
    	db, err := gorm.Open(mysql.New(mysql.Config{Conn: conn, DisableWithReturning: true}))
    	if err != nil {
    		t.Fatalf("Should open db success, but got %v", err)
    	}
    
    	tx := db.Begin()
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  7. mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt

        path: String,
        responseCode: AtomicInteger,
      ): Thread {
        return Thread {
          val url = mockWebServer.url(path).toUrl()
          val conn: HttpURLConnection
          try {
            conn = url.openConnection() as HttpURLConnection
            responseCode.set(conn.responseCode) // Force the connection to hit the "server".
          } catch (ignored: IOException) {
          }
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  8. prepare_stmt.go

    	// Reason why cannot lock conn.PrepareContext
    	// suppose the maxopen is 1, g1 is creating record and g2 is querying record.
    	// 1. g1 begin tx, g1 is requeue because of waiting for the system call, now `db.ConnPool` db.numOpen == 1.
    	// 2. g2 select lock `conn.PrepareContext(ctx, query)`, now db.numOpen == db.maxOpen , wait for release.
    	// 3. g1 tx exec insert, wait for unlock `conn.PrepareContext(ctx, query)` to finish tx and release.
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 28 08:47:39 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  9. internal/http/dial_dnscache.go

    		baseDialCtx = (&net.Dialer{
    			Timeout:   30 * time.Second,
    			KeepAlive: 30 * time.Second,
    		}).DialContext
    	}
    
    	return func(ctx context.Context, network, addr string) (conn net.Conn, err error) {
    		host, port, err := net.SplitHostPort(addr)
    		if err != nil {
    			return nil, err
    		}
    
    		if net.ParseIP(host) != nil {
    			// For IP only setups there is no need for DNS lookups.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jul 03 19:30:51 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  10. internal/grid/README.md

        }
    
        err := manager.RegisterSingleHandler(grid.HandlerDiskInfo, handler)
    ```
    
    Sample call:
    ```go
        // Get a connection to the remote host
        conn := manager.Connection(host)
    	
        payload := []byte("request")
        response, err := conn.SingleRequest(ctx, grid.HandlerDiskInfo, payload)
    ```
    
    If the error type is `*RemoteErr`, then the error was returned by the remote server. Otherwise it is a local error.
    
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.4K bytes
    - Viewed (0)
Back to top