Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for ListenPacket (0.9 sec)

  1. transport/internet/system_listener.go

    	return lc.Listen(ctx, addr.Network(), addr.String())
    }
    
    func (dl *DefaultListener) ListenPacket(ctx context.Context, addr net.Addr, sockopt *SocketConfig) (net.PacketConn, error) {
    	var lc net.ListenConfig
    
    	lc.Control = getControlFunc(ctx, sockopt, dl.controllers)
    
    	return lc.ListenPacket(ctx, addr.Network(), addr.String())
    }
    
    // RegisterListenerController adds a controller to the effective system listener.
    Go
    - Registered: 2022-06-29 06:07
    - Last Modified: 2020-07-30 17:20
    - 2K bytes
    - Viewed (0)
  2. cmd/devp2p/internal/v4test/framework.go

    	remote     *enode.Node
    	remoteAddr *net.UDPAddr
    }
    
    func newTestEnv(remote string, listen1, listen2 string) *testenv {
    	l1, err := net.ListenPacket("udp", fmt.Sprintf("%v:0", listen1))
    	if err != nil {
    		panic(err)
    	}
    	l2, err := net.ListenPacket("udp", fmt.Sprintf("%v:0", listen2))
    	if err != nil {
    		panic(err)
    	}
    	key, err := crypto.GenerateKey()
    	if err != nil {
    		panic(err)
    	}
    Go
    - Registered: 2022-06-26 18:27
    - Last Modified: 2020-07-07 12:37
    - 3.1K bytes
    - Viewed (0)
  3. p2p/netutil/error_test.go

    )
    
    // This test checks that isPacketTooBig correctly identifies
    // errors that result from receiving a UDP packet larger
    // than the supplied receive buffer.
    func TestIsPacketTooBig(t *testing.T) {
    	listener, err := net.ListenPacket("udp", "127.0.0.1:0")
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer listener.Close()
    	sender, err := net.Dial("udp", listener.LocalAddr().String())
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer sender.Close()
    
    Go
    - Registered: 2022-06-26 18:27
    - Last Modified: 2016-11-22 21:20
    - 1.9K bytes
    - Viewed (0)
  4. transport/internet/tcp_hub.go

    //
    // v2ray:api:beta
    func ListenSystemPacket(ctx context.Context, addr net.Addr, sockopt *SocketConfig) (net.PacketConn, error) {
    	return effectiveListener.ListenPacket(ctx, addr, sockopt)
    Go
    - Registered: 2022-06-29 06:07
    - Last Modified: 2019-01-19 09:59
    - 2.1K bytes
    - Viewed (0)
  5. cmd/devp2p/discv4cmd.go

    	}
    	ln := enode.NewLocalNode(db, cfg.PrivateKey)
    	return ln, cfg
    }
    
    func listen(ln *enode.LocalNode, addr string) *net.UDPConn {
    	if addr == "" {
    		addr = "0.0.0.0:0"
    	}
    	socket, err := net.ListenPacket("udp4", addr)
    	if err != nil {
    		exit(err)
    	}
    	usocket := socket.(*net.UDPConn)
    	uaddr := socket.LocalAddr().(*net.UDPAddr)
    	if uaddr.IP.IsUnspecified() {
    		ln.SetFallbackIP(net.IP{127, 0, 0, 1})
    Go
    - Registered: 2022-06-26 18:27
    - Last Modified: 2020-11-04 14:02
    - 7.3K bytes
    - Viewed (0)
  6. cmd/docker-proxy/network_proxy_test.go

    		listener, err := net.Listen(proto, address)
    		if err != nil {
    			t.Fatal(err)
    		}
    		server = &StreamEchoServer{listener: listener, testCtx: t, opts: opts}
    	case strings.HasPrefix(proto, "udp"):
    		socket, err := net.ListenPacket(proto, address)
    		if err != nil {
    			t.Fatal(err)
    		}
    		server = &UDPEchoServer{conn: socket, testCtx: t}
    	case strings.HasPrefix(proto, "sctp"):
    		addr, err := sctp.ResolveSCTPAddr(proto, address)
    Go
    - Registered: 2022-06-29 12:04
    - Last Modified: 2021-08-27 06:56
    - 8.1K bytes
    - Viewed (0)
  7. cmd/devp2p/internal/v5test/framework.go

    	}
    }
    
    func (tc *conn) setEndpoint(c net.PacketConn) {
    	tc.localNode.SetStaticIP(laddr(c).IP)
    	tc.localNode.SetFallbackUDP(laddr(c).Port)
    }
    
    func (tc *conn) listen(ip string) net.PacketConn {
    	l, err := net.ListenPacket("udp", fmt.Sprintf("%v:0", ip))
    	if err != nil {
    		panic(err)
    	}
    	tc.listeners = append(tc.listeners, l)
    	return l
    }
    
    // close shuts down all listeners and the local node.
    func (tc *conn) close() {
    Go
    - Registered: 2022-06-26 18:27
    - Last Modified: 2022-06-13 14:24
    - 7.1K bytes
    - Viewed (0)
  8. api/go1.11.txt

    pkg go/types, method (*Interface) EmbeddedType(int) Type
    pkg go/types, method (*Var) Embedded() bool
    pkg net, method (*ListenConfig) Listen(context.Context, string, string) (Listener, error)
    pkg net, method (*ListenConfig) ListenPacket(context.Context, string, string) (PacketConn, error)
    pkg net, type Dialer struct, Control func(string, string, syscall.RawConn) error
    pkg net, type ListenConfig struct
    Plain Text
    - Registered: 2022-07-01 12:35
    - Last Modified: 2018-08-22 03:48
    - 25K bytes
    - Viewed (1)
  9. api/go1.txt

    pkg net, func Listen(string, string) (Listener, error)
    pkg net, func ListenIP(string, *IPAddr) (*IPConn, error)
    pkg net, func ListenMulticastUDP(string, *Interface, *UDPAddr) (*UDPConn, error)
    pkg net, func ListenPacket(string, string) (PacketConn, error)
    pkg net, func ListenTCP(string, *TCPAddr) (*TCPListener, error)
    pkg net, func ListenUDP(string, *UDPAddr) (*UDPConn, error)
    Plain Text
    - Registered: 2022-07-01 12:35
    - Last Modified: 2013-08-14 18:58
    - 1.7M bytes
    - Viewed (0)
Back to top