文件名称:myATM
- 所属分类:
- Linux/Unix编程
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2014-07-01
- 文件大小:
- 8kb
- 下载次数:
- 0次
- 提 供 者:
- fanba*****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
1.启动服务器时创建两个消息队列,关闭时进行删除。用信号关闭,在信号的处理函数中删除消息队列。
2.服务端根据客户端发过来的数据,判断是何种请求,再根据各种请求做出相应的处理。
3.分析开户的流程:客户端输入用户名,密码和金额,把数据封存在msg中,通过消息队列发给服务器,在服务器端生成一个帐号,然后把account信息写入文件,并把处理结果通过消息队列返回给客户端。
4.服务器端用多进程完成各种功能。(vfork+execl)
通过跳转到另一个可执行程序,来实现各种业务功能。
客户端的代码:
1.提供选择界面,打印各种功能选择,供客户进行选择。
2.拿到客户请求之后,向消息队列中提交相应的数据(用struct msg做载体),并等待服务器端的处理结果。
-1 Create two message queues when you start the server, delete closed. Signal off, delete the message queue handler signals.
2 based on the client server data sent over to determine what kind of request, and then make the appropriate treatment according to various requests.
3 analysis accounts for process: the client to enter a user name, password, and the amount of data archived in msg, sent to the server through the message queue, to generate an account on the server side, and then written to the file account information and the processing results through the message queue is returned to the client.
4 server to complete a variety of functions with multiple processes. (vfork+ execl)
Jump to another via an executable program, to achieve a variety of business functions.
Client code:
1 selection interface provides print various functional options for customers to choose.
2 to get the client request, the message queue corresponding to the submitted data (struct msg used as
2.服务端根据客户端发过来的数据,判断是何种请求,再根据各种请求做出相应的处理。
3.分析开户的流程:客户端输入用户名,密码和金额,把数据封存在msg中,通过消息队列发给服务器,在服务器端生成一个帐号,然后把account信息写入文件,并把处理结果通过消息队列返回给客户端。
4.服务器端用多进程完成各种功能。(vfork+execl)
通过跳转到另一个可执行程序,来实现各种业务功能。
客户端的代码:
1.提供选择界面,打印各种功能选择,供客户进行选择。
2.拿到客户请求之后,向消息队列中提交相应的数据(用struct msg做载体),并等待服务器端的处理结果。
-1 Create two message queues when you start the server, delete closed. Signal off, delete the message queue handler signals.
2 based on the client server data sent over to determine what kind of request, and then make the appropriate treatment according to various requests.
3 analysis accounts for process: the client to enter a user name, password, and the amount of data archived in msg, sent to the server through the message queue, to generate an account on the server side, and then written to the file account information and the processing results through the message queue is returned to the client.
4 server to complete a variety of functions with multiple processes. (vfork+ execl)
Jump to another via an executable program, to achieve a variety of business functions.
Client code:
1 selection interface provides print various functional options for customers to choose.
2 to get the client request, the message queue corresponding to the submitted data (struct msg used as
(系统自动生成,下载前可以参看下载内容)
下载文件列表
myATM\100000.dat
.....\100001.dat
.....\ATM.txt
.....\bank.c
.....\bank.h
.....\client.c
.....\dao.c
.....\dao.c.bak
.....\dao.h
.....\id.dat
.....\link.txt
.....\open.c
.....\server.c
.....\server.c.bak
myATM