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 12-17-2005, 07:57 AM   #1
raja1979
LQ Newbie
 
Registered: Dec 2005
Posts: 15

Rep: Reputation: 0
sending messages from linux to windows


hi,

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++
 
Old 12-17-2005, 08:21 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Are you using Windows XP? It has firewall settings. You can disable them completely or create an open port for your messaging software within it.
 
Old 12-18-2005, 11:20 PM   #3
raja1979
LQ Newbie
 
Registered: Dec 2005
Posts: 15

Original Poster
Rep: Reputation: 0
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.
 
Old 12-18-2005, 11:28 PM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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).

IMHO ...

Last edited by paulsm4; 12-18-2005 at 11:30 PM.
 
Old 12-21-2005, 11:08 PM   #5
raja1979
LQ Newbie
 
Registered: Dec 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks a lot all of you,

The problem was due to firewall only,
Thank you for all your help
 
  


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
sending simple messages between linux clients mlu Linux - Networking 2 05-11-2005 11:39 AM
Sending messages in LAN?? Umanga Linux - Newbie 1 10-26-2004 01:32 AM
Sending messages tired Linux - Newbie 2 08-11-2004 02:37 AM
Sending messages over SSH jeucken Linux - Networking 1 12-15-2003 01:54 PM
Sending messages across a network... kierl Linux - General 3 04-07-2003 01:11 PM

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

All times are GMT -5. The time now is 05:04 PM.

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