会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
菜鸟也有高飞的时候
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
下一页
2017年10月13日
网络基础
摘要: 网络模型: OSI七层模型: 应用层:典型协议:HTTP,FTP,DNS,DHCP 表示层:进行格式装换 会话层:定义连接的方式,例如全双工通信,半双工通信,单工通信 传输层:协议:TCP,UDP 网络层:设备:路由器,典型协议IP,ICMP,路由协议:OSPF,BGP,RIP 数据链路层:设备:交
阅读全文
posted @ 2017-10-13 20:05 菜鸟也有高飞的时候
阅读(229)
评论(0)
推荐(0)
2017年7月7日
重叠IO
摘要: // 重叠IO网络模式.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include #include #include using namespace std; #pragma comment (lib,"ws2_32.lib") #define PORT 6000 #define MSGSIZE 1024 typedef struct {...
阅读全文
posted @ 2017-07-07 11:10 菜鸟也有高飞的时候
阅读(372)
评论(0)
推荐(0)
2017年7月6日
EventSelect网络模式
摘要: #include "stdafx.h" #include #include #include using namespace std; #pragma comment (lib,"ws2_32.lib") #define PORT 6000 SOCKET ArrSocket[1024] = { 0 }; WSAEVENT ArrEvent[1024] = { 0 }; DWORD dwTot...
阅读全文
posted @ 2017-07-06 15:52 菜鸟也有高飞的时候
阅读(608)
评论(0)
推荐(0)
2017年7月5日
select网络模式
摘要: fd_set set; FD_ZERO(&set); /*将set清零使集合中不含任何fd*/ FD_SET(fd, &set); /*将fd加入set集合*/ FD_CLR(fd, &set); /*将fd从set集合中清除*/ FD_ISSET(fd, &set); /*在调用select()函
阅读全文
posted @ 2017-07-05 20:41 菜鸟也有高飞的时候
阅读(648)
评论(0)
推荐(0)
2017年7月4日
简单的UDP编程
摘要: //Server #include "stdafx.h" #include #include #include using namespace std; #pragma comment (lib,"ws2_32.lib") #define PORT 6000 //UDP Server int main() { //初始化网络环境 WSADATA wsa; if (WS...
阅读全文
posted @ 2017-07-04 20:52 菜鸟也有高飞的时候
阅读(1958)
评论(0)
推荐(0)
TCP一个简单应用
摘要: #include "stdafx.h" #include #include #include using namespace std; #pragma comment (lib,"ws2_32.lib") //Client int main() { WSADATA wsa; if (WSAStartup(MAKEWORD(2, 2), &wsa) != 0) { ...
阅读全文
posted @ 2017-07-04 16:15 菜鸟也有高飞的时候
阅读(281)
评论(0)
推荐(0)
简单的TCP编程
摘要: //Sever #include "stdafx.h" #include #include #include using namespace std; #pragma comment (lib,"ws2_32.lib") #define PORT 6000 DWORD WINAPI clientProc(LPVOID lparam) { //为客户端服务 SOCKET soc...
阅读全文
posted @ 2017-07-04 10:57 菜鸟也有高飞的时候
阅读(231)
评论(0)
推荐(0)
2017年6月30日
Unicode与ANSI的转换
摘要: string UnicodeToANSI(const wstring& str) { char *pStr; int iwstrLen = WideCharToMultiByte(CP_ACP, 0, str.c_str(), -1, 0, 0, 0, 0); cout << "iwstrlen=" << iwstrLen << endl; pStr = new ...
阅读全文
posted @ 2017-06-30 20:05 菜鸟也有高飞的时候
阅读(1408)
评论(0)
推荐(0)
2017年4月21日
进程相关内容
摘要: 进程的创建: WinExec函数: UINT Win Exec(LPCSTR lpCmdLine, UINT uCmdShow); lpCmdLine:指向一个空结束的字符串,串中包含将要执行的应用程序的命令行(文件名加上可选参数)。 uCmdShow:定义Windows应用程序的窗口如何显示,并为
阅读全文
posted @ 2017-04-21 13:09 菜鸟也有高飞的时候
阅读(226)
评论(0)
推荐(0)
2017年3月25日
windows基础(三)
摘要: 设备环境:又叫做设备上下文,设备DC,DC,主要是程序用来画图的, 利用GetDC(HWND类型)可以获得客户区的DC 利用GetWindowsDC(HWND类型)可以获得窗口的DC 当获取一个DC的时候用完之后需要释放这个DC,ReleaseDC(HWND类型, 该DC变量); 当我们不需要用系统
阅读全文
posted @ 2017-03-25 13:50 菜鸟也有高飞的时候
阅读(172)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
下一页
公告