File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ replacing `net.Dial` with `gas.Dial` in your code.
15
15
16
16
To test the library, you can run a local TCP server with:
17
17
18
- $ tcpserver -v -RHl0 127.0.0.1 9999 echo
18
+ $ ncat -l 9999 -k
19
19
20
20
and run this code:
21
21
@@ -37,7 +37,7 @@ and run this code:
37
37
38
38
// client sends "hello, world!" to the server every second
39
39
for {
40
- _, err := conn.Write([]byte("hello, world!"))
40
+ _, err := conn.Write([]byte("hello, world!\n "))
41
41
if err != nil {
42
42
// if the client reached its retry limit, give up
43
43
if err == gas.ErrMaxRetries {
Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ func ExampleTCPClient() {
300
300
go func () {
301
301
defer cwg .Done ()
302
302
for {
303
- if _ , err := c .Write ([]byte ("hello, world!" )); err != nil {
303
+ if _ , err := c .Write ([]byte ("hello, world!\n " )); err != nil {
304
304
switch e := err .(type ) {
305
305
case Error :
306
306
if e == ErrMaxRetries {
You can’t perform that action at this time.
0 commit comments