Supports tcp. Build with bash -x ./scripts/build.sh
or ./scripts/build.sh
$ cd cmd/; go run echo_net.go -s [-port port] [-a addr]
or
$ ./bin/mac/echo_net -s [-port port] [-a addr]
$ cd cmd/; go run echo_net.go -c [-port port] [-a addr]
or
$ ./bin/mac/echo_net -c [-port port] [-a addr]
Whatever the client sends, the server sends back. The server prints what it got from the client. The client prints what got sent back.
Use the -y
option for either server or client. Should only be specifed for one or the other, not both. When specifying -y
for the server, don't specif -y
for client and optionally specify -e
for the client to test correct behavior. -e
does nothing for the server