net/

directory
v0.0.0-...-d86056c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2018 License: Apache-2.0

README

net

net是BoltMQ中对网络层通讯的封装,包括协议封装、解包,对网络连接的管理和优化,提供高性能的网络基础组件。

特性

  • 连接管理
  • 高连接数
  • 高并发
  • 长连接
  • 粘包
  • 协议封装、解包
  • 事件通知

设计

  • 每个连接有单独的goroutine处理接收的报文。
  • 每个连接有单独的缓存队列和粘包处理,保证高可用的同时减少资源竞争。
  • 粘包后的数据采用多Goroutine处理,提高并发能力。
  • 使用对象池降低GC压力。

Alt text

参考

  • io模型(epoll)
  • go net
  • more

待优化

  1. 粘包算法,减少粘包开销。
  2. 提高消息的缓冲处理能力。
  3. 优化协议封装、解包。

Read the docs

Directories

Path Synopsis
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL