91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 671KB
    文件類(lèi)型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-13
  • 語(yǔ)言: C/C++
  • 標(biāo)簽: C??C++??Socket??多線程??

資源簡(jiǎn)介

最新的C C++Socket技術(shù)總結(jié)! 開(kāi)發(fā)環(huán)境:VS2010 實(shí)現(xiàn)功能: 1、運(yùn)用多線程和Socket技術(shù)實(shí)現(xiàn)Socket Server端偵聽(tīng)多個(gè)客戶(hù)端請(qǐng)求; 2、實(shí)現(xiàn)服務(wù)器端循環(huán)處理客戶(hù)端不同請(qǐng)求從而實(shí)現(xiàn)不同測(cè)試要求,并向客戶(hù)端循環(huán)發(fā)送數(shù)據(jù); 3、實(shí)現(xiàn)客戶(hù)端向服務(wù)器端發(fā)送不同測(cè)試命令,并接收服務(wù)器端發(fā)送的數(shù)據(jù); 4、運(yùn)用指針上下文實(shí)現(xiàn)不同線程的數(shù)據(jù)共享; 5、實(shí)現(xiàn)多個(gè)客戶(hù)端同時(shí)連接服務(wù)器端; 6、服務(wù)器端程序和客戶(hù)端程序可以運(yùn)行在同一臺(tái)計(jì)算機(jī),也可以運(yùn)行在兩臺(tái)計(jì)算機(jī)。 測(cè)試方法: 1、打開(kāi)ServerDemo.exe 2、打開(kāi)ClientDemo.exe 并輸入127.0.0.1(同一臺(tái)計(jì)算機(jī))或目標(biāo)機(jī)IP地址(兩臺(tái)計(jì)算機(jī))

資源截圖

代碼片段和文件信息

#include?“stdio.h“
#include?“TcpCtl.h“
#include?
using?namespace?std;
typedef?unsigned?char?u8;
int?main()
{
int?j?=?0;
char?ip;
char?ipaddr[20];
int?c?=?0;
printf(“please?enter?target?ip?addr?to?connect(eg:127.0.0.1):\n“);
cin>>ipaddr;
printf(“client:?%s??port=6000\n“?ipaddr);

TcpCtl?*tcp1?=?new?TcpCtl((char*)?ipaddr?“6000“);

u8?buffer[65];
u8?revbuffer[65];


while(c?!=?30)
{
printf(“\npress?cmd?to?start?simulation\n“);
printf(“cmd=1:?Test1\tcmd=2:?Test2\tcmd=3:Test3\n“);
printf(“cmd=20:?Stop\tcmd=30:?Exit\tcmd?+?data?=?65bytes\n“);
scanf(“%d“?&c);

buffer[0]?=?(u8)c;
for(int?i?=0?;?i? buffer[i+1]?=?i;
tcp1->SendCommand((char*)buffer?65?(char*)revbuffer);

}
getchar();
tcp1->DisConnect();
tcp1->Close();
return?0;
}

?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----

?????文件???????4062??2014-08-06?22:48??C?Socket通信多線程實(shí)例VS2010\ClientDemo\ClientDemo.vcxproj

?????文件????????357??2014-08-16?12:59??C?Socket通信多線程實(shí)例VS2010\ClientDemo\ClientDemo.vcxproj.filters

?????文件????????222??2014-08-16?13:02??C?Socket通信多線程實(shí)例VS2010\ClientDemo\ClientDemo.vcxproj.user

?????文件???????1282??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\cl.command.1.tlog

?????文件??????34018??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\CL.read.1.tlog

?????文件????????838??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\CL.write.1.tlog

?????文件??????????2??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\link-cvtres.read.1.tlog

?????文件??????????2??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\link-cvtres.write.1.tlog

?????文件??????????2??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\link.4612-cvtres.read.1.tlog

?????文件??????????2??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\link.4612-cvtres.write.1.tlog

?????文件??????????2??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\link.4612.read.1.tlog

?????文件??????????2??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\link.4612.write.1.tlog

?????文件??????????2??2014-08-08?21:11??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\link.7056-cvtres.read.1.tlog

?????文件??????????2??2014-08-08?21:11??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\link.7056-cvtres.write.1.tlog

?????文件??????????2??2014-08-08?21:11??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\link.7056.read.1.tlog

?????文件??????????2??2014-08-08?21:11??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\link.7056.write.1.tlog

?????文件???????1590??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\link.command.1.tlog

?????文件???????3132??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\link.read.1.tlog

?????文件????????824??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\link.write.1.tlog

?????文件??????76638??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\main.obj

?????文件????????378??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\mt.command.1.tlog

?????文件????????306??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\mt.read.1.tlog

?????文件????????306??2014-08-09?14:57??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\mt.write.1.tlog

?????文件????????516??2014-08-09?14:55??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\rc.command.1.tlog

?????文件????????278??2014-08-09?14:55??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\rc.read.1.tlog

?????文件????????286??2014-08-09?14:55??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\rc.write.1.tlog

?????文件??????36071??2014-08-09?14:52??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\TcpCtl.obj

?????文件???????2056??2014-08-09?14:52??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\TcpDemo.Build.CppClean.log

?????文件????????406??2014-08-09?14:55??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\TcpDemo.exe.embed.manifest

?????文件????????472??2014-08-09?14:55??C?Socket通信多線程實(shí)例VS2010\ClientDemo\Debug\TcpDemo.exe.embed.manifest.res

............此處省略76個(gè)文件信息

評(píng)論

共有 條評(píng)論

相關(guān)資源