Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 8.2% on proxy.golang.org

proxy.golang.org : gitee.com/mirrors/Tao.git

Package tao implements a light-weight TCP network programming framework. Server represents a TCP server with various ServerOption supported. 1. Provides custom codec by CustomCodecOption; 2. Provides TLS server by TLSCredsOption; 3. Provides callback on connected by OnConnectOption; 4. Provides callback on meesage arrived by OnMessageOption; 5. Provides callback on closed by OnCloseOption; 6. Provides callback on error occurred by OnErrorOption; ServerConn represents a connection on the server side. ClientConn represents a connection connect to other servers. You can make it reconnectable by passing ReconnectOption when creating. AtomicInt64, AtomicInt32 and AtomicBoolean are providing concurrent-safe atomic types in a Java-like style while ConnMap is a go-routine safe map for connection management. Every handler function is defined as func(context.Context, WriteCloser). Usually a meesage and a net ID are shifted within the Context, developers can retrieve them by calling the following functions. Programmers are free to define their own request-scoped data and put them in the context, but must be sure that the data is safe for multiple go-routines to access. Every message must define according to the interface and a deserialization function: There is a TypeLengthValueCodec defined, but one can also define his/her own codec: TimingWheel is a safe timer for running timed callbacks on connection. WorkerPool is a go-routine pool for running message handlers, you can fetch one by calling func WorkerPoolInstance() *WorkerPool.

Registry - Source - Documentation - JSON
purl: pkg:golang/gitee.com/mirrors/%21tao.git
License: Apache-2.0
Latest release: over 3 years ago
First release: over 3 years ago
Namespace: gitee.com/mirrors
Last synced: about 19 hours ago

    Loading...
    Readme
    Loading...