package
0.3.3
Repository: https://github.com/lim-yoona/tcpack.git
Documentation: pkg.go.dev

# README

safetcpack

English | 简体中文

safetcpack 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.

Notice: Using of multiple packagers based on the same TCP connection to send and receive messages concurrently can result in uncertain order of messages sent and received. If you want to ensure that messages are sent and received in order, please use tcpack and avoid concurrency.

Installation Guidelines

  1. To install the safetcpack package, you first need to have Go installed, then you can use the command below to add safetcpack as a dependency in your Go program.
go get -u github.com/lim-yoona/tcpack
  1. Import it in your code:
import safetcpack "github.com/lim-yoona/tcpack/safe"

Usage

The usage of safetcpack is consistent with that of tcpack.

Examples

Here are some Examples.