资源简介
本系统是在linux系统环境下通过C语言利用文件系统进行开发的银行模拟系统;系统分为三个模块:服务器端、客户端、业务员端;采用了socket网络编程技术、多线程技术、信号量、文件系统、tcp/ip等主流技术。
代码片段和文件信息
#include
#include
#include
#include
#include
#include
#include “../include/customer.h“
#include “../include/bank.h“
//#include “../include/io_impl.h“
int main(){
char serverIP[20];
printf(“请输入服务器IP地址:“);
scanf(“%s“serverIP);
int sockfd=socket(AF_INETSOCK_STREAM0);
if(-1==sockfd)perror(“创建失败“)exit(-1);
struct sockaddr_in addr;
addr.sin_family=AF_INET;
addr.sin_port=htons(2223);
addr.sin_addr.s_addr=inet_addr(serverIP);
int res=connect(sockfd(struct sockaddr*)&addrsizeof(addr));
if(-1==res)perror(“连接服务器失败“)exit(-1);
printf(“服务器已连接\n“);
sleep(1);
//struct masege msg;
//msg.type=TEST;
//send(sockfd&msgsizeof(msg)0);
//int flag;
//recv(sockfd&flagsizeof(flag)0);
load(sockfd);
close(sockfd);
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
I.A.... 850 2012-08-28 20:01 bank0.0.3_src\ATM_src\ATM.c
I.A.... 3470 2012-08-28 18:49 bank0.0.3_src\ATM_src\customer.c
I.A.... 0 2012-08-25 18:44 bank0.0.3_src\bank项目文档
I.A.... 8787 2013-06-08 18:16 bank0.0.3_src\bin\ATM
I.A.... 10212 2013-06-08 18:16 bank0.0.3_src\bin\OPER
I.A.... 13666 2013-06-08 18:16 bank0.0.3_src\bin\SERVER
I.A..H. 12288 2013-06-08 10:14 bank0.0.3_src\include\.bank.h.swp
I.A.... 1084 2013-06-08 10:15 bank0.0.3_src\include\bank.h
I.A.... 146 2012-08-25 18:44 bank0.0.3_src\include\customer.h
I.A.... 815 2013-06-08 10:23 bank0.0.3_src\include\io_impl.h
I.A.... 92 2012-08-26 22:06 bank0.0.3_src\include\operator.h
I.A.... 1548 2013-06-08 18:16 bank0.0.3_src\lib\ATM.o
I.A.... 4472 2013-06-08 18:16 bank0.0.3_src\lib\customer.o
I.A.... 4424 2013-06-08 18:16 bank0.0.3_src\lib\customer_sys.o
I.A.... 9324 2013-06-08 18:16 bank0.0.3_src\lib\io_impl.o
I.A.... 1556 2013-06-08 18:16 bank0.0.3_src\lib\OPER.o
I.A.... 2976 2013-06-08 18:16 bank0.0.3_src\lib\operator.o
I.A.... 1840 2013-06-08 18:16 bank0.0.3_src\lib\server.o
I.A.... 8723 2013-06-09 10:43 bank0.0.3_src\log.txt
I.A.... 1004 2012-08-28 19:27 bank0.0.3_src\makefile
I.A.... 3468 2012-08-28 19:31 bank0.0.3_src\OPER_src\customer_sys.c
I.A.... 858 2012-08-28 20:05 bank0.0.3_src\OPER_src\OPER.c
I.A.... 2050 2013-06-08 10:30 bank0.0.3_src\OPER_src\operator.c
I.A.... 647 2013-06-09 10:48 bank0.0.3_src\read me.txt
I.A.... 9294 2013-06-08 10:29 bank0.0.3_src\server_src\io_impl.c
I.A.... 1064 2012-08-27 16:11 bank0.0.3_src\server_src\server.c
I.A.... 4846 2013-06-07 11:35 bank0.0.3_src\test\a.out
I.A.... 185 2013-06-07 11:35 bank0.0.3_src\test\test.c
I.A.... 0 2013-06-07 11:35 bank0.0.3_src\test\test.dat
I.A.... 32 2013-06-08 18:18 bank0.0.3_src\userfile\10001
............此处省略14个文件信息
- 上一篇:C++ 生成JPEG图片源代码
- 下一篇:奇异值分解SVD算法c语言源代码
评论
共有 条评论