no buffer space available error

sebastien s.thuriez at laposte.net
Wed May 8 13:42:51 EDT 2002


Hi,

I am trying a program that scan all the machines in the network that are ftp server.
After about 50 to 100 scan, I get the message :

no buffer space available.

import timeoutsocket
timeoutsocket.setDefaultSocketTimeout(5)
BUFSIZE = 1024
FTP_PORT = 21
FTP_DATA_PORT = FTP_PORT - 1
FTP_DATA_PORT = FTP_DATA_PORT + 50000

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setblocking(0)

try :
    s.connect((hostname,FTP_PORT))
except socket.error, why :
    print 'cannot connect...',why[1]


This is embedded in a function and I pass the hostname that I want to be tested.


What do I do wrong ? As I get the message can I flush the buffer ?
I am running python 2.1.1 on Windows Me and NT.

Regards,
Sebastien.



More information about the Python-list mailing list