管理客户端套接字池 [英] Manage Client Socket Pool

查看:142
本文介绍了管理客户端套接字池的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从Java应用程序管理到外部服务器的长时间运行的TCP套接字连接。我正在寻找一个好的套接字池,所以我将能够重新使用套接字。

I need to manage long running TCP socket connections to an external server from my Java application. I'm looking for a good socket pool so I will be able to re-use the sockets.

还有另一个解决方案,而不是 org.apache.commons.pool2

There is another solution than org.apache.commons.pool2 ?

推荐答案

以下是您可以尝试的一些对象池实现:

Here are some object pool implementations you may try:



我建议您对对象池实施进行基准测试,以便为您的项目找到最合适的实现。

I suggest you to benchmark the object pool implementations in order to find the most appropriate one for your project.

这篇关于管理客户端套接字池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆