LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-18-2006, 03:54 PM   #1
drgilberto
LQ Newbie
 
Registered: Jan 2006
Location: St.Louis
Distribution: Ubuntu
Posts: 5

Rep: Reputation: 0
Question How to connect 2 linux computers and using the connection using C code?


I have been trying to find this in Google, but I couldn't find any answer . Hopefully somebody can help me to solve this.

I have 2 Linux computers (using Ubuntu) and they need to 'talk' to each other. The 2 computers are part of a scientific experiment, and I need 2 different computers which play different roles in the experimental setup. They don't communicate much information, just a couple of bytes every ~50 milleseconds.

Right now, I use flat ribbon cables and ComputerBoard digital IO cards, and I use some custom functions to communicate over these lines. Of course that works, but the disadvantage is that the cables are vulnerable, and the IO cards are expensive. I'd rather do everything using USB or the Ethernet cards. But how can you do you that?

And what kind of cables would you use. And could anybody refer me to a code example?

Thanks!

Gilberto
 
Old 01-18-2006, 04:25 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
I haven't ever used it, but will a script utilizing netcat do the trick?
 
Old 01-18-2006, 04:51 PM   #3
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
beej tutorial is a good one..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Two computers need to connect to the net through a third one. dalek Linux - Networking 4 10-01-2005 01:16 AM
Other computers cant connect to me? empiiricus Linux - Networking 1 05-17-2004 09:31 AM
How to connect two computers one with Windows and other with Linux? dineshjk Linux - Networking 2 05-10-2004 09:00 AM
My computers cannot connect to each other using samba ! Help! ZhiYi Linux - Networking 7 02-12-2003 07:08 AM
Trying to connect to other computers on the network hextex Linux - Networking 1 05-04-2001 08:13 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration