|
-
February 6th, 2005, 04:54 PM
#1
Realtime data exchange between two computers
For our application we are looking at exchanging data between two computers in realtime, and I'm looking at using the ethernet to achieve this. I have done prorgamming with Visual C++ before, and am somewhat confident with it, but I've never done anything relating to network programming. Is there a step-by-step tutorial that I can find somewhere (book, internet) to get my started on this quickly, or maybe even a sample code?
Basically, it involves one computer to send out 5 numbers, each being a float or double, and the other computer receives these information in realtime, at the next cycle the first computer sents out another 5 numbers, and this process repeats until we tell the program to stop.
Many thanks in advance!
-
February 6th, 2005, 05:02 PM
#2
Re: Realtime data exchange between two computers
Well....there is some kind of flaw here...network communications cannot basically happen in real-time. Ethernet connections do not guarantee any kind of reliability, there are many things which can delay the transfer such as collisions.
So...how much 'real-time' do you actually need? What is the maximum time the data can be delayed after the got send?
-
February 6th, 2005, 05:11 PM
#3
Re: Realtime data exchange between two computers
Oops, sorry for the confusion. What I intend to use is to use the ethernet to connect two computers together ONLY, and not use it in a LAN or something like that.
At present, the update rate is about 50Hz for something that's a few bytes big, I would not expect it to be more than a few hundred Hz. As for the time delay, as long as it does not delay so much that it goes into the second computer the same time as the next set of data, it should be fine.
-
February 6th, 2005, 06:00 PM
#4
Re: Realtime data exchange between two computers
Do you have TCP/IP installed on these two machines? (ie do they have IP addresses?)... If so, you can use sockets. Look at the Winsock2 api or BSD socket API (on Unix).
For real-time networking, take a look at Quality of Service (QoS)... Don't know how good the support is on different operating systems.
-
February 6th, 2005, 06:17 PM
#5
Re: Realtime data exchange between two computers
 Originally Posted by j0nas
Do you have TCP/IP installed on these two machines? (ie do they have IP addresses?)... If so, you can use sockets. Look at the Winsock2 api or BSD socket API (on Unix).
Ok I'll have a search for tutorials for winsock2 on the net... thanks for the help!!
-
February 7th, 2005, 04:23 AM
#6
Re: Realtime data exchange between two computers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|