Sign in
go
/
talks
/
7039a792dd811b75bd4186daa9ce014c76c948d4
/
.
/
2012
/
chat
/
support
/
echo-no-concurrency.go
blob: 8be98e0b146765c6365515a1884e99644cb1d369 [
file
] [
log
] [
blame
]
package main
import (
"io"
"log"
"net"
)
const listenAddr = "localhost:4000"
func main() {
l, err := net.Listen("tcp", listenAddr)
if err != nil {
log.Fatal(err)
}
for {
c, err := l.Accept()
if err != nil {
log.Fatal(err)
}
io.Copy(c, c)
}
}