Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to pass a string value between 2 laptops where they are connected through a cable/router. there is no internet involve in this.
the string should passed from a one application in a one laptop to another laptops' different application.
how can this be done?
please help me!
Posted
Updated 17-Jul-11 1:19am
v2

1 solution

Look at setting up a Socket [^]connection between the two. The link includes an example.
 
Share this answer
 
Comments
Member 7779792 17-Jul-11 3:47am    
is there any other way of passing values instead of sockets?
OriginalGriff 17-Jul-11 4:06am    
There are, but generally they are more complex, not less!
You could implement the TCPListener on which sockets is based, but trust me, Sockets is a lot easier!
You are trying to do something quite complex in actual fact - communicate between two end points over an already existing communications network - so you have to "fit in" with everything else that is going on on that network. Sockets are a nice, easy way to do that.
DominicZA 17-Jul-11 3:52am    
Well no, how are they supposed to know that the other one exists! Don't be last, sockets are not hard to grasp and that is a good example to get you started.
Member 7779792 17-Jul-11 9:20am    
what about the remote calling methods like webservices,WCF etc?what are your suggestions about them?
Philippe Mori 17-Jul-11 19:10pm    
Well, sockets might be easier to use for simple communications. But other technologies might be more appropriate to exchange complex data or when you want to essentially "calls" functions at the other hand.

In short, I would say the more complex the problem is, the more it will worth the effort to learn web services, WCF etc...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900