Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Samu Tamminen committed Dec 31, 2021
1 parent 6b60094 commit 645b737
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions example/client/tcp_udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
func tcpClient() {
strEcho := "Hello from client! \n"
servAddr := "127.0.0.1:10080"
if len(os.Args) > 1 {
servAddr = os.Args[1]
if len(os.Args) > 2 {
servAddr = os.Args[2]
}
tcpAddr, err := net.ResolveTCPAddr("tcp", servAddr)
if err != nil {
Expand Down Expand Up @@ -48,7 +48,11 @@ func tcpClient() {

func udpClient() {
p := make([]byte, 2048)
conn, err := net.Dial("udp", "127.0.0.1:9095")
servAddr := "127.0.0.1:10070"
if len(os.Args) > 2 {
servAddr = os.Args[2]
}
conn, err := net.Dial("udp", servAddr)
if err != nil {
fmt.Printf("Some error %v", err)
return
Expand Down

0 comments on commit 645b737

Please sign in to comment.