Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for listenUDPAddress (0.17 sec)

  1. pkg/test/echo/server/endpoint/util.go

    }
    
    func listenOnUDS(uds string) (net.Listener, error) {
    	_ = os.Remove(uds)
    	ln, err := net.Listen("unix", uds)
    	if err != nil {
    		return nil, err
    	}
    
    	return ln, nil
    }
    
    func listenUDPAddress(ip string, port int) (net.PacketConn, int, error) {
    	parsedIP := net.ParseIP(ip)
    	ipBind := "udp"
    	if parsedIP != nil {
    		if parsedIP.To4() == nil && parsedIP.To16() != nil {
    			ipBind = "udp6"
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  2. pkg/test/echo/server/endpoint/udp.go

    	var port int
    	var err error
    	if s.Port.TLS {
    		return fmt.Errorf("TLS not supported for UDP")
    	}
    	// Listen on the given port and update the port if it changed from what was passed in.
    	listener, port, err = listenUDPAddress(s.ListenerIP, s.Port.Port)
    	// Store the actual listening port back to the argument.
    	s.Port.Port = port
    	if err != nil {
    		return err
    	}
    
    	s.l = listener
    	epLog.Infof("Listening UDP on %v\n", port)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 16:20:31 UTC 2023
    - 3.4K bytes
    - Viewed (0)
Back to top