Sockets: code works locally but fails over LAN

n00m n00m at narod.ru
Sat Sep 3 15:08:49 EDT 2005


Bryan wrote:
> Do you want to be a network engineer?
lol... definetely not! It's just my curiosity.
At my work my tools are: vba, vbs, jet-sql (ms access),
t-sql (ms sql server). The pretty humble set.

> My first two guess are:
>     The client is trying to make more than one connection.
>     Putting accept in a loop and moving some stuff will support
>     that.
BUT your *1st version* does NOT support more than ONE client's
connection! How do I know that? I just ran several (3) instances
of my.vbs (almost) simultaneously and only the first of them could
connect to SQL Server via Python!
Just in case: SQL Server itself can accept up to 32767 clients.

Then (if I'm not wrong here) what's the difference with my own
version? Maybe replacing send() with sendall() will be quite enough
to make it working over LAN? I've NOT tested this!

PS Yes! Your last version works like a champ. It easily handles up
to 5 instances of my.vbs! Except of this thing:
> AttributeError: 'module' object has no attribute 'SHUT_WR'
Seems it's a pure Unix constant.

>> But it does NOT work without IDLE!
> Odd. What happens if you run it from a command line?
In a moment - AFTER I start my.vbs - in console window new prompt
"D:\>" appears... and vbs reports "General Network Error".

Dennis;
No no no! It's NOT firewalls trick. It's NOT db permissions issue.
VBS and SQL Server work with each other ABSOLUTELY FINE - from ANY
machine at ANY time at ANY free port - BUT WITHOUT Python being a
mediator for them.




More information about the Python-list mailing list