資源簡(jiǎn)介
linux C TCP/UDP客戶端服務(wù)端的相互實(shí)時(shí)通信
在ubuntu 下測(cè)試通過

代碼片段和文件信息
#include???
#include???
#include???
#include???
#include???
#include?
#include?
#include?
//?用戶自定義的頭文件
#include?“client_handler.h“
#include?“protocol.h“
//?該串口的用戶信息
client?client_info;
//?串口用戶信息隊(duì)列
ClientVector?client_vector;
//?協(xié)議處理函數(shù)指針數(shù)組
typedef?void?(*?ProtocolHandler)(p_base?*?p_base_ptr);
ProtocolHandler?protocol_handler_array[PROTOCOL_NUM];
//?選擇串口用戶名線程
pthread_t?input_name_thread;
//?用戶輸入串口信息線程
pthread_t?input_message_thread;
//?服務(wù)器端網(wǎng)絡(luò)地址結(jié)構(gòu)體
struct?sockaddr_in?remote_addr;????
int?main(int?argcchar?*?argv[])???
{
//?初始化串口用戶隊(duì)列和協(xié)議處理函數(shù)隊(duì)列
init(argcargv);
????//?創(chuàng)建輸入串口用戶名線程
createInputNameThread();
//??接受服務(wù)器發(fā)來的包
????recvServerPacket();
exit(EXIT_SUCCESS);
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????194??2012-06-27?12:48??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\.goutputstream-41SFGW
?????文件??????24637??2012-06-27?10:57??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\client
?????文件???????1012??2012-06-27?17:35??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\client.c
?????文件????????924??2011-01-04?13:39??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\client.c~
?????文件???????6164??2012-06-27?12:48??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\client_handler.c
?????文件???????6164??2011-01-04?10:21??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\client_handler.c~
?????文件???????1281??2012-06-27?11:44??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\client_handler.h
?????文件???????1245??2011-01-04?10:15??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\client_handler.h~
?????文件????????530??2010-12-30?10:05??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\makefile
?????文件???????3744??2012-06-27?11:42??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\process_protocol.c
?????文件???????3673??2011-01-04?10:21??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\process_protocol.c~
?????文件????????536??2012-06-27?11:36??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\process_protocol.h
?????文件????????524??2011-01-04?10:06??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\process_protocol.h~
?????文件???????3201??2012-06-27?11:34??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\protocol.h
?????文件???????3195??2012-06-27?11:33??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client\protocol.h~
?????文件????????155??2012-06-27?11:17??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\server\.goutputstream-VGIKGW
?????文件????????546??2011-01-05?16:38??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\server\makefile
?????文件???????1628??2012-06-27?17:44??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\server\process_protocol.c
?????文件????????203??2012-06-27?17:44??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\server\process_protocol.h
?????文件???????3201??2012-06-27?17:47??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\server\protocol.h
?????文件??????28737??2012-06-27?10:57??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\server\server
?????文件???????1112??2012-06-27?11:18??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\server\server.c
?????文件???????1112??2012-06-27?11:18??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\server\server.c~
?????文件??????10281??2012-06-27?11:07??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\server\server_handler.c
?????文件???????2000??2011-01-04?09:44??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\server\server_handler.h
????..AD...?????????0??2012-06-27?17:35??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\client
????..AD...?????????0??2012-06-27?17:47??服務(wù)端客戶端相互通信的實(shí)現(xiàn)\server
????..AD...?????????0??2012-06-27?17:49??服務(wù)端客戶端相互通信的實(shí)現(xiàn)
-----------?---------??----------?-----??----
???????????????105999????????????????????28
............此處省略1個(gè)文件信息
評(píng)論
共有 條評(píng)論