-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tomsucho
committed
Dec 21, 2023
1 parent
d001ee3
commit e2bfcbb
Showing
1 changed file
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
## This is a Golang code examples repo I used when learning. | ||
## This is a Golang code examples repo I used for learning. | ||
|
||
### TCP Client Server | ||
|
||
- Features: | ||
|
||
- starts a TCP server on port 8080 by default | ||
- prints data the client has sent it | ||
- responds back to client with timestamped text message confirming data reception | ||
- the client currently sends a single hardcoded msg and quits, so quite rudimentary to not say useless, but this is just learning. For more advanced client functionality one could just use telnet or netcat instead of course :) | ||
- Installation: | ||
- go install github.com/tomsucho/go-examples/tcp-client-server/tcp-client@latest | ||
- go install github.com/tomsucho/go-examples/tcp-client-server/tcp-server@latest | ||
- Usage: | ||
- the above will build executable and store it under your `$PATH` so you then you can start each with just typing `tcp-server` or `tcp-client`. |