随笔分类 - 网络编程
Linux网络编程
摘要:服务端: 1 #include <sys/socket.h> 2 #include <unistd.h> 3 #include <sys/types.h> 4 #include <stdint.h> 5 #include <assert.h> 6 #include <fcntl.h> 7 #incl
阅读全文
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 9 #include 10 #include 11 #include 12 13 void signal_func(int sig) 14 { 15 int saved_errno = er...
阅读全文
摘要:1 #include 2 3 union 4 { 5 short s; 6 char c[sizeof(short)]; 7 }un; 8 9 int main(int argc, char *argv[]) 10 { 11 un.s = 0x0102; 12 13 if(sizeof(short) == 2) 14 { ...
阅读全文

浙公网安备 33010602011771号