Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleListener (0.1 sec)

  1. src/net/example_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package net_test
    
    import (
    	"context"
    	"fmt"
    	"io"
    	"log"
    	"net"
    	"time"
    )
    
    func ExampleListener() {
    	// Listen on TCP port 2000 on all available unicast and
    	// anycast IP addresses of the local system.
    	l, err := net.Listen("tcp", ":2000")
    	if err != nil {
    		log.Fatal(err)
    	}
    	defer l.Close()
    	for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 13 16:36:59 UTC 2021
    - 8.5K bytes
    - Viewed (0)
Back to top