简体   繁体   English

C++ 套接字编程

[英]Socket Programming in C++

Can anybody provide me some sample example on Client and server connection using sockets in C++.任何人都可以为我提供一些关于使用 C++ 中的套接字的客户端和服务器连接的示例示例。 I have gone through some tutorials now i want to implement it.我已经阅读了一些教程,现在我想实现它。 How to start ?如何开始?

你可以在这里找到一个有效的客户端-服务器程序: Beej's Guide to Network Programming

There is no socket API in the C++ Standard. C++ 标准中没有套接字 API。 The POSIX C API is fairly portable (the GNU libC documentation provides examples of UDP and TCP clients and servers that I usually turn to when I'm scratching together another server), or you could use the Boost.ASIO library for a more C++ experience.... POSIX C API 是相当可移植的(GNU libC 文档提供了 UDP 和 TCP 客户端和服务器的示例,当我在另一台服务器上拼凑时,我通常会使用这些示例),或者您可以使用 Boost.ASIO 库以获得更多的 C++ 体验....

A good C++ networking library is ACE .一个好的 C++ 网络库是ACE The only problem is that there aren't any good tutorials online that I have found.唯一的问题是我在网上找不到任何好的教程。 This book is pretty good though.不过这本书还是不错的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM