如何使用CAsyncSocket类在1台PC上连接9台Etherent机器 [英] how do I connect 9 Etherent machines on 1 PC using CAsyncSocket class

查看:49
本文介绍了如何使用CAsyncSocket类在1台PC上连接9台Etherent机器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们开发了基于MFC对话框的应用程序,使用CAsyncSocket类将2台以太网机器连接到PC。数据每3秒在以太网端口上发送。一分钟内20个字符串(最多25个字符)1台机器因此软件在一分钟内就能收到40个字符串。这个软件工作正常。



新要求:

现在我们要在同一台PC上再添加7台(共9台)以太网机器。数据以1分为单位发送,每分钟20个交易。因此,总共180笔交易(20笔交易x9机器= 180)以分钟的形式发送给PC。



我关注的领域如下:

1.是否可以将9台机器连接到单台PC?如果我们无法在1台PC上连接9台机器那么可以连接到单台PC的最大机器是什么。

2.如果180分钟的数据分钟,是否有任何数据丢失?它取决于机器的保持距离吗?

3.如何在单台PC上模拟9台机器数据的测试而不会丢失任何数据。





问候,



Dipti

解决方案



  1. 可以直接将一些机器连接到一台PC(如果你有足够的通讯卡),或者通过网络连接。
  2. 据我所知, TCP / IP协议负责确保数据的发送。一分钟内有180个25个字符的字符串,不是那么多数据...
  3. 您可以通过运行连接到localhost的一些进程来模拟同一台PC上的某些机器( 127.0.0.1 )。

We have developed MFC dialog based application to connect 2 ethernet machines to PC using "CAsyncSocket" class. Data is sent on Ethernet port every 3 seconds. 20 string(max 25 Characters) in a minute by 1 machine So total 40 strings to be received by the software in a minute. This software is working fine.

New requirement:
Now we want to add 7 more(total 9) Ethernet machines to the same PC. Data is sent by 1 scale is 20 transaction in a minute. So total 180 transactions(20 transaction x9 machine=180) in minute to be sent to PC.

My area of concern is as below:
1. Is it possible to connect 9 machine to single PC? If we cannot connect 9 machine on 1 PC then what is the maximum machines which can be connected to single PC.
2. Is there any data loss if 180 string of data in minute? Will it depend upon the distance where the machines are kept?
3. How do I simulate the testing of 9 machine data on single PC without any data loss.


Regards,

Dipti

解决方案


  1. It's possible to connect some machines to a single PC directly (if you have enough communication cards) or, via the network.
  2. As I know, the TCP/IP protocol is responsible for ensuring the send of the data. 180 strings of 25 characters in a minute, aren't such a lot of data...
  3. You can simulate some machines on the same PC by running some processes that are connected to localhost (127.0.0.1).


这篇关于如何使用CAsyncSocket类在1台PC上连接9台Etherent机器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆