Why won't Python connect to C++ socket on NT?

Ed Stauff Ed_Stauff at avid.com
Sun Jul 30 20:39:07 EDT 2000


I'm trying to get a Python TCP client to talk to a C++ TCP server via 
sockets, and I keep getting "connection refused".  I have no 
trouble getting a C++ client and a C++ server to talk to each other, 
and I can get two Python interpreters to connect to each other via 
sockets.  But I can't seem to get Python to connect via sockets 
to any server written in C++.  One sample server is extremely 
simple, taken from Comer's TCP/IP book.  The few lines of Python code 
I'm using are taken right from the example given in the socket 
module.

What could be going wrong?  I'm a newbie at Python and sockets, but 
experienced in C++.  I'm using Python 1.5.2 on Windows NT; the C++ 
code is in Visual C++ 6.  My client and server are (for testing 
purposes anyway) running on the same machine.  Any help will be 
greatly appreciated!

Thanks,

-- Ed






More information about the Python-list mailing list