Echo Handler
package echo
import (
"io"
"log"
)
func Handler(connection io.ReadWriteCloser) error {
defer connection.Close()
_, err := io.Copy(connection, connection)
if err != nil {
log.Print("Error in copy: ", err)
}
return err
}
package echo
import (
"io"
"log"
)
func Handler(connection io.ReadWriteCloser) error {
defer connection.Close()
_, err := io.Copy(connection, connection)
if err != nil {
log.Print("Error in copy: ", err)
}
return err
}