Skip to content

Commit 4b9dc10

Browse files
committed
updated doc
1 parent 432d662 commit 4b9dc10

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ replacing `net.Dial` with `gas.Dial` in your code.
1515
1616
To test the library, you can run a local TCP server with:
1717
18-
$ tcpserver -v -RHl0 127.0.0.1 9999 echo
18+
$ ncat -l 9999 -k
1919
2020
and run this code:
2121
@@ -37,7 +37,7 @@ and run this code:
3737
3838
// client sends "hello, world!" to the server every second
3939
for {
40-
_, err := conn.Write([]byte("hello, world!"))
40+
_, err := conn.Write([]byte("hello, world!\n"))
4141
if err != nil {
4242
// if the client reached its retry limit, give up
4343
if err == gas.ErrMaxRetries {

tcp_client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ func ExampleTCPClient() {
300300
go func() {
301301
defer cwg.Done()
302302
for {
303-
if _, err := c.Write([]byte("hello, world!")); err != nil {
303+
if _, err := c.Write([]byte("hello, world!\n")); err != nil {
304304
switch e := err.(type) {
305305
case Error:
306306
if e == ErrMaxRetries {

0 commit comments

Comments
 (0)