Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for CheckPortAvailability (0.25 sec)

  1. internal/http/check_port_linux.go

    package http
    
    import (
    	"context"
    	"net"
    	"syscall"
    	"time"
    )
    
    // CheckPortAvailability - check if given host and port is already in use.
    // Note: The check method tries to listen on given port and closes it.
    // It is possible to have a disconnected client in this tiny window of time.
    func CheckPortAvailability(host, port string, opts TCPOptions) (err error) {
    	lc := &net.ListenConfig{
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed May 03 21:12:25 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  2. internal/http/check_port_others.go

    package http
    
    import (
    	"context"
    	"net"
    	"time"
    )
    
    // CheckPortAvailability - check if given host and port is already in use.
    // Note: The check method tries to listen on given port and closes it.
    // It is possible to have a disconnected client in this tiny window of time.
    func CheckPortAvailability(host, port string, opts TCPOptions) (err error) {
    	lc := &net.ListenConfig{}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed May 03 21:12:25 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  3. internal/http/check_port_test.go

    		{"127.0.0.1", port, fmt.Errorf("listen tcp 127.0.0.1:%v: bind: address already in use", port)},
    	}
    
    	for _, testCase := range testCases {
    		err := CheckPortAvailability(testCase.host, strconv.Itoa(testCase.port), TCPOptions{})
    		switch {
    		case testCase.expectedErr == nil:
    			if err != nil {
    				t.Fatalf("error: expected = <nil>, got = %v", err)
    			}
    		case err == nil:
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed May 03 21:12:25 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  4. cmd/server-main.go

    	// (non-)minio process is listening on IPv4 of given port.
    	// To avoid this error situation we check for port availability.
    	logger.FatalIf(xhttp.CheckPortAvailability(globalMinioHost, globalMinioPort, globalTCPOptions), "Unable to start the server")
    
    	globalConnReadDeadline = ctxt.ConnReadDeadline
    	globalConnWriteDeadline = ctxt.ConnWriteDeadline
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 32.7K bytes
    - Viewed (1)
Back to top