02_hands-on

command
v0.0.0-...-42ea4af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 5 Imported by: 0

README

Build upon the code from the previous exercise

In that previous exercise, we WROTE to the connection.

Now I want you to READ from the connection.

You can READ and WRITE to a net.Conn as a connection implements both the reader and writer interface.

Use bufio.NewScanner() to read from the connection.

After all of the reading, include these lines of codes:

fmt.Println("Code get here.") io.WriteString(c, "I see you connected.")

Launch your TCP server.

In your web browser, visit localhost:8080.

Now go back and look at your terminal.

Can you answer the question as to why "I see you connected." is never written?

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL