Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
lim-yoona committed Oct 16, 2023
1 parent 36c5e4d commit 7439f2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ package main
import "github.com/lim-yoona/tcpack"

func main() {
// 创建一个打包器
// Create a packager
mp := tcpack.NewMsgPack(8, tcpConn)

// 打包一个消息并发送
// Pack and send a message
msg := tcpack.NewMessage(0, uint32(len([]byte(data))), []byte(data))
num, err := mp.Pack(msg)

// 解包一个消息并接收
// Unpack and receive a message
msg, err := mp.Unpack()
}
```
Expand Down
2 changes: 1 addition & 1 deletion safe/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# safetcpack
English | [简体中文](README-CN.md)

safetcpack provides a thread-safe version of tcpack.
[safetcpack](https://github.com/lim-yoona/tcpack/tree/main/safe) provides a thread-safe version of tcpack.

## Difference from tcpack
Unlike tcpack, with safetcpack, you can construct multiple packers for a TCP connection and use them concurrently in multiple goroutines.
Expand Down

0 comments on commit 7439f2a

Please sign in to comment.