ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i have written a client/ server program in linux & windows to send messages to & from both
when i use the windows client to connect the linux server it is able to connect , but when i try to connect the linux client to windows winsock control from linux the connection times out.
but the same linux client connects to the linux server.
do i have to do some other settings for the linux client to connect to the windows pc.
the windows client & server is in Visual Basic 6.
and in linux i have written the client & server in C++
i have added the port in windows firewall setting , when i am using tcpview to view connections it shows that the connecton has be established but data transfer does not take place.
Sockets are absolutely a good, 100% platform-independent way to communicate between any two hosts, regardless if one happens to be Windows and the other Linux.
The best way to proceed is:
1. Code a C client that can be compiled for both Windows and Linux
(although TCP/IP itself is 100% platform-independent, you'll need a few #ifdef's
to accomodate the difference between Winsock and Linux sockets).
2. Run the client locally, on the same host as the server (using loopback address 127.0.0.1).
3. Once the application is working locally, it should also work the same way remotely.
If they weren't connecting at all (and you're sure the two hosts could "ping" each other), firewalls would indeed be my first guess.
But based on what you're saying, it sounds like your Windows client/server pair is in some way incompatible with your Linux client/server pair.
Hence my strong advice: code up ONE client you can test in BOTH environments (with a simple recompile).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.