Client-server QT Tool for Managing PPC (PowerPC)

         The first English article I am trying to write.

1、  The characteristic of PPC

        1) User does not need to log in. So long as the PPC is idle, user can connect it using socket.

        2) One PPC can only be connected to one user. When it is connected by someone, the others won’t connect this PPC anymore.

        So the question is how can I connect all the PPCs that is idle, to let others must use the client to apply PPC?

        Originally, I thought that I need mutiple thread to connect so many PPCs, but it turned out to be a wrong method. Because one QTcpSocker object can only be used to connect one PPC.

        Every PPC must be connected by corresponding QTcpSocket object. Sowe need more than one QTcpSocket object. So the way to achieve it is define a List that contain QTcpSocket * data.

 

2、  Which kind of client- server model I should choose?

        QT assistant and C++ GUI programming introduce two kinds model for each. The client can be blocking and non-blocking. The server can be single-thread and multiple-threads.

        Because the number of user is little, so the client has no need to be blocking. And the server will be multiple threads.

3、Defining data needed to be transported between clients and server

        1)      Occupancy of PPC

        2)    User of PPC

        3)      Request for getting and returning PPC


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值