Skip to content

Commit

Permalink
xin结构体都改为大写
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwuruoshui committed Feb 16, 2022
1 parent d26ade1 commit c513c9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ client
```go
func main() {

// 1.conn to server
// conn to server
conn, err := net.Dial("tcp", ":7777")
if err != nil {
log.Println("Client start error:", err)
return
}
// 2. write msg to server

for {
datapack := xnet.NewDataPack()

// 1.发送消息
// 1.send msg to server
msg := xnet.NewMessage(1, []byte("Xin V1.0 client Test message!!!"))
packData, err := datapack.Pack(msg)
if err != nil {
Expand All @@ -69,7 +69,7 @@ func main() {
break
}

//2. recv message
//2. recv msg
data := make([]byte, datapack.GetHeadLen())
if _, err := conn.Read(data); err != nil {
break
Expand Down

0 comments on commit c513c9b

Please sign in to comment.