- 博客(5)
- 收藏
- 关注
原创 Resume the deleted files by keywords.
#include #include int main(void){ FILE *fp; char buf[1024]; long i=0; long j=0; long k=0; fp=fopen("/dev/dsk/c0t1d0s7","r"); while(!feof(fp)){ fread(buf,1024,1,fp); for(j=0
2004-11-22 17:44:00 1006
原创 Some guru's code for daemon.
#include #include #include #include #define RUNNING_DIR "/tmp"#define LOCK_FILE "exampled.lock"#define LOG_FILE "exampled.log"void log_message(char *filename,char *message){ FILE *logfile; log
2004-11-22 17:39:00 824
原创 The stream of send() and recev().
1)When i use send() and recev() to manipulate stream, if i send “hello”, and i can got the string which length is 7.2)The sniffer monitor the network, and i use “putty” to telnet a unix server, and wh
2004-11-16 19:20:00 895
原创 A simply client code for that server.
#include #include #include #include #include #define PORT 3490#define MAXDATASIZE 1000int main(int argc,char *argv[]){ char buf[MAXDATASIZE]; int sockfd; int numbytes; struct sockaddr_in t
2004-11-10 15:00:00 1086
原创 A simply server code with c.
#include #include #include #include #include /*#include *//*#include *//*#include */#define MYPORT 3490#define BACKLOG 10 /*how many pending connections queue will hold*/main(void ){ int sockf
2004-11-10 14:58:00 1397
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人