");\rgets(cmd_buf);\rif (!stmcmp(cmd_buf, "conn", 4)) {\rretcode = CreateConnection(&sin_addr); /* !" */\rprintf(Hreturn code: " /> ");\rgets(cmd_buf);\rif (!stmcmp(cmd_buf, "conn", 4)) {\rretcode = CreateConnection(&sin_addr); /* !" */\rprintf(Hreturn code: " />

全文预览

C、C++Socket编程原理

上传者:火锅鸡 |  格式:pdf  |  页数:34 |  大小:3058KB

文档介绍
rror code = %d\n", retcode);\rexit(1);\r)\rwhile (1){\rprintf(w>");\rgets(cmd_buf);\rif (!stmcmp(cmd_buf, "conn", 4)) {\rretcode = CreateConnection(&sin_addr); /* !" */\rprintf(Hreturn code: %d\n", retcode);\r)\relse if(!strncmp(cmd_buf, "send", 4)) {\rprintf("Sockets Number:");\rscanf("%dn, &sockno1);\rretcode = SendPacket(sockno1, buf, 26); /* ´µ); */\rprintf(Hreturn code: %d\n", retcode, sizeof(buf));.\r)\relse if (!stmcmp(cmd_buf, "close", 4)) {\rprintf("Sockets Number:");\rscanf("%d", &sockno1);\rretcode = CloseConnection(sockno1); /*"*1\rprintf(Hreturn code: %d\n", retcode);\r)\relse if (!strncmp(cmd_buf, "quit", 4))\rexit(O);\relse\rputchar(1\007');\r}/* end while */\r)\r*„³http:¹www.xgdown.com

收藏

分享

举报
下载此文档