摘要: 服务器端: #include <stdio.h> #include <stdlib.h> #include <winsock2.h> #define BUF_SIZE 1024 void CALLBACK ReadCompRoutine(DWORD, DWORD, LPWSAOVERLAPPED, 阅读全文
posted @ 2019-11-15 15:18 wisdomroc 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 发送端: #include <stdio.h> #include <string.h> #include <winsock2.h> void ErrorHanding(char *msg); int main(int argc, char *argv[]) { WSADATA wsaData; SO 阅读全文
posted @ 2019-11-15 09:54 wisdomroc 阅读(159) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <string.h> #include <winsock2.h> #define BUF_SIZE 100 void CompressSockets(SOCKET hSockArr[], int idx, int total); void Co 阅读全文
posted @ 2019-11-14 15:13 wisdomroc 阅读(202) 评论(0) 推荐(0) 编辑
摘要: WaitForSingleObject函数的使用 #include <stdio.h> #include <windows.h> #include <process.h> unsigned WINAPI ThreadFunc(void *arg); int main(int argc, char * 阅读全文
posted @ 2019-11-12 16:01 wisdomroc 阅读(369) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <arpa/inet.h> #include <sys/socket.h> #include <pthread.h> #de 阅读全文
posted @ 2019-11-07 15:50 wisdomroc 阅读(491) 评论(0) 推荐(0) 编辑
摘要: server.c client.c 注意,需要在工程属性中设置:链接器-输入-附加依赖项中添加:ws2_32.lib。 阅读全文
posted @ 2019-10-22 22:22 wisdomroc 阅读(331) 评论(0) 推荐(0) 编辑
摘要: server.c client.c 阅读全文
posted @ 2019-10-22 22:04 wisdomroc 阅读(736) 评论(0) 推荐(0) 编辑
摘要: 对这个3D坐标手动进行OpenGL的四个变换,得到的结果就是屏幕上的像素坐标。前三个变换(Model, View, Projection)都是4x4矩阵,操作对象是四维向量,所以需要把(100, 100, 100)补上w分量,变成(100, 100, 100, 1)。然后把前三个变换的矩阵依次左乘到 阅读全文
posted @ 2018-04-04 11:03 wisdomroc 阅读(917) 评论(0) 推荐(0) 编辑