Problems with sockets on Win NT

mkrishnam at my-deja.com mkrishnam at my-deja.com
Wed Aug 4 19:28:59 EDT 1999


Hi,

I'm trying to exchange datagram (UDP) packets
between a unix machine and a Win NT machine.

The UDP packets sent from Win NT machine are
received properly on unix machine. However UDP
packets sent from unix machine is not at all
received on WinNT machine.

I'm using recvfrom method to receive the packets.

The code I'm using is as below.

# Code on Win NT machine

from socket import *

my_sock = socket(AF_INET, SOCK_DGRAM)
my_sock.bind('localhost', 6123)

while(1):
        test = my_sock.recv(1024)
        print "got it!"

# Code on Unix machine

from socket import *

my_sock = socket(AF_INET, SOCK_DGRAM)
my_sock.bind('localhost', 6440)

dst_addr = 'leto',6123

while (1):
        print my_sock.sendto("Hello", dst_addr)

A help is kindly appreciated.

Thanks
- Murali


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




More information about the Python-list mailing list