Created
January 27, 2017 02:44
-
-
Save enriclluelles/4f4b04453f43c8796560938db69f08fe to your computer and use it in GitHub Desktop.
Trigger reset by peer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net" | |
"log" | |
) | |
func main() { | |
addr, _ := net.ResolveTCPAddr("tcp", ":3456") | |
conn, err := net.ListenTCP("tcp", addr) | |
if err != nil { | |
log.Fatal(err) | |
} | |
b := make([]byte, 0, 0) | |
for { | |
fmt.Print(b) | |
c, errA := conn.AcceptTCP() | |
if errA !=nil { | |
log.Println(err) | |
} | |
c.Close() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment