Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: timeout wxparmset
The way I do it until now. first i do a wxPing(ip) and if i get @true i try sConnect(talksocket1,ip,port) and if i get a connecting i send a request (sSendLine) ...
it's running but i want to make it faster. so i try to use only sConnect with a short timeout (1 second). so my problem ist: how can i reduce the timeout for sConnect?
Here is his sample code:
AddExtender("WWWSK32I.DLL") wxParmSet(5,1) start1=timeymdhms() talksocket1=sOpen() ret=sConnect(talksocket1,"188.8.131.52","123");using this socket for demonstration purposes err=wxGetLastErr() msg=wxGetErrDesc(err) Message(timediffsecs(timeymdhms(),start1),"Winsock Error A %err% %msg%") sclose(talksocket1) ;when my internet router is offline the sConnect needs 10 seconds wxParmSet(5,10) start10=timeymdhms() talksocket10=sOpen() ret=sConnect(talksocket10,"184.108.40.206","123") err=wxGetLastErr() msg=wxGetErrDesc(err) Message(timediffsecs(timeymdhms(),start10),"Winsock Error A %err% %msg%") sclose(talksocket10)
There is no timeout for the sConnect that can be modified. Even if there were, making a short timeout would just result in a failed connection.
Article ID: W15101
File Created: 2017:07:28:13:58:49
Last Updated: 2002:09:05:13:49:33