摘要:
1、tcpclient(Linux)1 SocketAddress sa("192.168.20.43", 7000);2 StreamSocket ss(sa);3 int n = ss.sendBytes("hello", 5);4 char buffer[256];5 n = ss.receiveBytes(buffer, sizeof(buffer)... 阅读全文
摘要:
1、Poco::Net::TCPServer实现一个多线程的TCP 服务器。2、服务器使用一个ServerSocket接收请求的连接,服务器使连接保持以队列形式。3、正在运行的线程从队列中取出连接然后处理它们;运行的线程会自动调整,依赖于队列中等待的连接数量。4、TCPServer创建它自己的线程,接受连接,然后把它们放到队列中。5、TCPServer使用TCPServerConnection对象来处理一个连接。你必须要创建自己的TCPServerConnection子类,工厂也一样。 工厂对象通过构造TCPServer来创建。6、你的TCPServerConnection 子类必须要重载ru 阅读全文
摘要:
学习网址:1、http://www.cppblog.com/richbirdandy/archive/2010/09/10/123994.html一篇博客:Poco::TCPServer框架解析2、http://pocoproject.org/documentation/index.html POCO官网(源码下载、PDF、文档、社区)3、http://www.libpoco.com/site/info/ Poco C++ Library 助力C++开发(POCO库中文编程参考指南)4、http://blog.csdn.net/poechant/article/details/7484781 阅读全文