#include "stdio.h" #include "stdint.h" #include "windows.h" #include "ws2tcpip.h" void main(void) { struct sockaddr_in sa; char str[INET_ADDRSTRLEN]; ...
分类:
Web程序 时间:
2020-09-09 19:04:36
阅读次数:
51
承接上篇IO复用之select selet将描述符和事件分离,所以在select接口需要传入三个数组表示不同的事件集合。poll也是在一定时间内轮询所有的描述符,但它将事件和描述结合。 函数签名 #include <poll.h> int poll(struct pollfd *fds, nfds_ ...
分类:
其他好文 时间:
2020-09-09 18:53:57
阅读次数:
47
SQL 是用于访问和处理数据库的标准的计算机语言。 SQL 是什么? SQL,指结构化查询语言,全称是 Structured Query Language。 SQL 让您可以访问和处理数据库。 SQL 是一种 ANSI(American National Standards Institute 美国 ...
分类:
数据库 时间:
2020-08-31 13:25:28
阅读次数:
81
#include <stdio.h>#include <malloc.h>//结点结构体定义typedef struct link_node { int n;//数据域 struct link_node *next;//指针域:(此时结构体尚未定义完整,不能用 NODE *next; )用该结构体类 ...
分类:
其他好文 时间:
2020-08-28 15:04:53
阅读次数:
74
include<stdio.h> include<malloc.h> typedef struct Queue { int * pBase; int front; int rear; }QUEUE,*PQUEUE; void init_queue(PQUEUE);//初始化 bool en_queu ...
分类:
其他好文 时间:
2020-08-28 14:28:37
阅读次数:
45
枚举是 C 语言中的一种基本数据类型,它可以让数据更简洁,更易读。 枚举语法定义格式为: enum 枚举名 {枚举元素1,枚举元素2,……}; 接下来我们举个例子,比如:一星期有 7 天,如果不用枚举,我们需要使用 #define 来为每个整数定义一个别名: #define MON 1 #defin ...
分类:
编程语言 时间:
2020-08-26 19:02:34
阅读次数:
83
1.方法声明 在函数声明时,在其名字之前放上一个变量,即是一个方法。这个附加的参数会将该函数附加到这种类型上,即相当于为这种类型定义了一个独占的方法。 package main import "fmt" type People struct { name string age uint8 } fun ...
分类:
其他好文 时间:
2020-08-26 18:54:13
阅读次数:
53
在Linux内核中,用struct cdev来表示字符设备。
分类:
系统相关 时间:
2020-08-26 18:30:57
阅读次数:
49
最近看了《Linux设备驱动详解这本书》,简单总结Linux设备驱动开发的一些基础知识。
分类:
系统相关 时间:
2020-08-25 18:38:10
阅读次数:
58
goshell执行优化版+输出结果为table格式packagemainimport("fmt""github.com/modood/table""golang.org/x/crypto/ssh""io/ioutil""net""time")funcconnect(user,password,host,keystring,portint,cipherList[]string)(*ssh.Sessi
分类:
系统相关 时间:
2020-08-25 15:55:00
阅读次数:
59