C++ Socket 库 C++ Sockets

openkk 12年前
     <p>C++ Sockets 是一个跨平台的 Sockets 库,实现包括 TCP、UDP、ICMP、SCTP 协议。已实现的应用协议包括有 SMTP、HTTP(S)、Ajp (1.3)。具有 SOCKS 客户端实现以及匿名 DNS ,支持 HTTP 的 GET/POST/PUT 以及 WebServer 的框架。</p>    <p>示例代码:</p>    <pre class="brush:cpp; toolbar: true; auto-links: false;">#include  #include "StatusSocket.h"   StatusSocket::StatusSocket(ISocketHandler& h) :TcpSocket(h) { }   void StatusSocket::OnAccept() {  Send("Local hostname : " + Utility::GetLocalHostname() + "\n");  Send("Local address : " + Utility::GetLocalAddress() + "\n");  Send("Number of sockets in list : " + Utility::l2string(Handler().GetCount()) + "\n");  Send("\n"); }</pre>    <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1325078486077" target="_blank">http://www.open-open.com/lib/view/home/1325078486077</a></p>    <p></p>