M
Mohammed Smadi
hi;
i have the following piece of code:
=============
s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
s.bind(("",port))
s.sendto(data,(MY_GW,port))
data = s.recvfrom(1024)
============
data contains some instructions which i am sending to MY_GW. If the
reply arrives from the MY_GW quickly then things fine, otherwise the
program is going to freeze waiting for the reply. I want to do the
following:
1- Be able to impose a timeout after which i want to stop executing
the s.recvfrom statement.
rgds;
m.smadi
i have the following piece of code:
=============
s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
s.bind(("",port))
s.sendto(data,(MY_GW,port))
data = s.recvfrom(1024)
============
data contains some instructions which i am sending to MY_GW. If the
reply arrives from the MY_GW quickly then things fine, otherwise the
program is going to freeze waiting for the reply. I want to do the
following:
1- Be able to impose a timeout after which i want to stop executing
the s.recvfrom statement.
rgds;
m.smadi