socket編程七:Linux下的socket演示程序

本節演示了 Linux 下的代碼,server.cpp 是服務器端代碼,client.cpp 是客戶端代碼,要實現的功能是:客戶端從服務器讀取一個字符串並打印出來。 服務器端代碼 server.cpp:html #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <arpa/
相關文章
相關標籤/搜索