跨平臺的 Sockets 庫 :C++ Sockets

jopen 11年前發布 | 15K 次閱讀 C/C++開發 C++ Sockets

C++ Sockets這一個對BSD風格Sockets的跨平臺C++封裝。 實現包括 TCP、UDP、ICMP、SCTP 協議。已實現的應用協議包括有 SMTP、HTTP(S)、Ajp (1.3)。具有 SOCKS 客戶端實現以及匿名 DNS ,支持 HTTP 的 GET/POST/PUT 以及 WebServer 的框架。

#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>

項目主頁:http://www.baiduhome.net/lib/view/home/1371945696822

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!