[TOC] ``` func main() { log.SetFlags(log.Lshortfile|log.Ldate) listener, e := net.Listen("tcp",":9001") if e != nil { panic(e) } log.Println("start") defer listener.Close() for{ conn, e := listener.Accept() if e != nil { panic(e) } log.Println(conn.RemoteAddr().String()) go handle(conn) } } func handle(conn net.Conn) { for{ bytes :=make([]byte,2048) n, err := conn.Read(bytes) if err == io.EOF { continue } if n==0 || err != nil { log.Println(err) } data :=bytes[:n] log.Println(string(data)) _,err = conn.Write(data) if err != nil { log.Println(err) } } } ```