We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For now, conn.Read may return a length of 0, so bufio.NewScanner() cannot be used. Similarly, fmt.Fscanf() cannot be used.
bufio.NewScanner()
fmt.Fscanf()
Similar to the following tinygo-org/tinygo#2739
What works now is the following code.
buf := [1024]byte{} for { n := int(0) for { n, err = conn.Read(buf[:]) if err != nil { failMessage(err.Error()) } if n > 0 { break } time.Sleep(5 * time.Millisecond) } fmt.Printf("recv: %q\r\n", string(buf[:n])) }
I would like the following to work also Because I think that is Go-way code. Of course, we can check for errors by using conn.Read.
scanner := bufio.NewScanner(conn) for scanner.Scan() { fmt.Printf("recv: %q\r\n", scanner.Text()) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For now, conn.Read may return a length of 0, so
bufio.NewScanner()
cannot be used.Similarly,
fmt.Fscanf()
cannot be used.Similar to the following
tinygo-org/tinygo#2739
What works now is the following code.
I would like the following to work also
Because I think that is Go-way code.
Of course, we can check for errors by using conn.Read.
The text was updated successfully, but these errors were encountered: