Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Go Back  Xtreme Visual Basic Talk > > > Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure


Reply
 
Thread Tools Display Modes
  #1  
Old 09-30-2002, 09:48 AM
Cyberax's Avatar
Cyberax Cyberax is offline
Centurion
 
Join Date: Sep 2002
Location: Manchester, UK
Posts: 155
Default Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure


Hi Guys,

Im having a bit of a winsock nightmare,

The purpose of my application is to poll a database for TCP requests then send the information to another computer,the data transfer works 2 way so i am using the same application on both compuers.

Im dont think i know enough about the winsock as i would like to, but to be honest i have been through many pages and sites on the web and found this one the most informative.

OKAY Heres the question:

* * * * * * * * * *

i have added an option in the winsock_error event that outputs the details of the error to screen and whenever i have multiple connections at the same time, i get the following error
"10053 Connection is aborted due to timeout or other failure" also when i get this error it seems to make my application think that the winsock object(which i create at runtime in an array to allow multiple connections) has unloaded as the winsock.count method reports the wrong amount of loaded objects.

* * * * * * * * * *

To be honest though this is more of a bug than a problem as my program works exectly how i want it but the winsock keeps returning that error. which i want to solve before i move on in developing the program anymore.

* * * * * * ** * * * *

I have looked all over the MSDN and TECHNET pages and even scanned this forum and i seem to have exhausted all possible locations for information on the VB Winsock control.

Any help would be Appreciated,

Many Thanks

Ian,
__________________
Why do croutons come in airtight packages? Aren`t they just stale bread to begin with?
Reply With Quote
  #2  
Old 09-30-2002, 11:58 AM
ChiefRedBull's Avatar
ChiefRedBullWinsock Nightmare : 10053 Connection is aborted due to timeout or other failure ChiefRedBull is offline
ISearchGoogle

Retired Moderator
* Expert *
 
Join Date: May 2001
Location: england
Posts: 6,321
Default

I think it would be best if you posted your code... at least the
relevant sections to the error - including the line that causes it.
__________________
Chuck Norris ordered a Big Mac at Burger King, and got one.
Reply With Quote
  #3  
Old 09-30-2002, 04:47 PM
Cyberax's Avatar
Cyberax Cyberax is offline
Centurion
 
Join Date: Sep 2002
Location: Manchester, UK
Posts: 155
Default Its a winsovck error

this error is not a vb error but gets reported by winsock and the program carries on running, and i have no on error handles.

i can paste all the winsock code but it has not been possible for me to trace where in the program the error occurs as the event fires only when i have an array of winsocks open and if i step through execution then this wont occur as i am firing through the execution at a different rate.

i am just wondering if anyone has had this problem before.
__________________
Why do croutons come in airtight packages? Aren`t they just stale bread to begin with?
Reply With Quote
  #4  
Old 10-01-2002, 03:45 AM
Cyberax's Avatar
Cyberax Cyberax is offline
Centurion
 
Join Date: Sep 2002
Location: Manchester, UK
Posts: 155
Default The Code !?!

I have pasted all the code of which i think is relavent, this is basicly all the vb code for the Listen winsock control.

The error is only reported when i have multiple loaded winsocks, i.e. when 4 connections come in at once.

the problem is though, the program does do everything its supposed to do, it works but this error has me worried as there must be something that i am doing wrong.


Code:
Private Sub Listen_ConnectionRequest(Index As Integer, ByVal requestID As Long) 'Get a new consequtive ID for winsock CtrlID = Listen.UBound + 1 'Load a new winsock to accept incomming Load Listen(CtrlID) 'Initiate a 10 second timeout counter for this control Load TmrTimeout(CtrlID) TmrTimeout(CtrlID).Interval = 10000 TmrTimeout(CtrlID).Enabled = True 'Accept the request with the requestID parameter. Listen(CtrlID).Accept requestID 'Send a connected message to client machine WelcomeMsg = IP_Address & " " & Now Listen(CtrlID).SendData WelcomeMsg DoEvents End Sub Private Sub Listen_DataArrival(Index As Integer, ByVal bytesTotal As Long) 'Accepting data from client . . . . strData = "" Listen(Index).GetData strData 'Validate and insert this data DataRxdOk = False Call LaunchService 'Send back a notification to client If DataRxdOk Then 'Everything was launched fine Listen(Index).SendData "Ok" Else 'Something is wrong Listen(Index).SendData "Error" End If 'Allow winsock to send the delivery response DoEvents 'Close connection Listen(Index).Close DoEvents 'Unload control element + timeout Unload Listen(Index) Unload TmrTimeout(Index) End Sub 'It is this event that the error is reported but the program 'continues execution Private Sub Listen_Error(Index As Integer, ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean) Debug.Print Number & " " & Description LstErrors.AddItem ("WS Err(" & Index & ")" & Number & " " & Description) End Sub Private Sub TmrTimeout_Timer(Index As Integer) Dim ErrReason As String If Listen(Index).State = sckConnected Then 'Client isnt sending data ErrReason = "Client Timeout" Listen(Index).SendData "Timeout" Else 'Client has disconnected ErrReason = "Lost Connection : " & TcpState(Listen(Index).State) End If DoEvents 'Close + unload Listen(Index).Close Unload Listen(Index) TmrTimeout(Index).Enabled = False Unload TmrTimeout(Index) End Sub
__________________
Why do croutons come in airtight packages? Aren`t they just stale bread to begin with?
Reply With Quote
  #5  
Old 10-01-2002, 04:24 AM
ChiefRedBull's Avatar
ChiefRedBullWinsock Nightmare : 10053 Connection is aborted due to timeout or other failure ChiefRedBull is offline
ISearchGoogle

Retired Moderator
* Expert *
 
Join Date: May 2001
Location: england
Posts: 6,321
Default

So when you're running the program, if several people try
to join at once, the error fires? Hmm...

You could try implementing a small state machine. Basically,
a variable public to the form with Listen on - each time a
_ConnectionRequest() is received, the first thing you should
do in the sub is check if the variable is flagged. This variable is
used to say whether a connection request is already taking
place. If there's no connection request happening, then proceed
with the current one:
Code:
_ConnectionRequest() If bInProgress Then Exit Sub bInProgress = True ' code bInProgress = False End Sub
That's it really, although it might not be this sub that's causing
the error.. since it could be the Winsock OCX itself, in which case,
adding the above won't make any difference.

If the program conntinues as it's supposed to, then I'd just put
this one down to MS, or perhaps implement some socket API
instead?
__________________
Chuck Norris ordered a Big Mac at Burger King, and got one.
Reply With Quote
  #6  
Old 10-01-2002, 05:22 AM
Cyberax's Avatar
Cyberax Cyberax is offline
Centurion
 
Join Date: Sep 2002
Location: Manchester, UK
Posts: 155
Default Found The Problem

Many Thanks for the reply Chief and your suggestion did solve the winsock problem which meant all errors were handled by my application. Many Thanks . .

I think i may have discovered the problem, if anyone is interested ?

To be honest i think chief knew this was the problem has his previous post solved it.

I outputted all the status information to a text file with the status the object and the index / control array index of the object i also added the time in NN:SS format but as you can see the program fired pretty quickly.

When i tested the program i did it with 5 simaltaneous requests, which were posted by this application but a different executable on a server on my LAN.

Now the problem is that as the connections are coming in so fast it is somehow firing a new event whenever the program hits the doevents that allows my winsock to send a "Connection OK" status back to the Host.

Meaning that the previous winsock is not closing its connection till the end of the program.

I think i have discovered that my current method for dealing with consequtive connections is not the most effecient.

The program is really doing some weird stuff as like i have said the main output result is what i want but when i look at the processes behind it , i shouldnt even work.

I have added the brackets myself just to cut the log into managable chunks.


((
"Load Listen(1) 56:27"
"Load Tmr(1) 56:27"
"Accept 1 56:27"
"rxd data 1 56:27"
"sendok 1 56:27"
"close 1 56:27"
"unload 1 56:27"
))

<<
"Sendwelcome 1 56:27"
"Load Listen(1) 56:27"
"Load Tmr(1) 56:27"
"Accept 1 56:27"
"Sendwelcome 1 56:27"
"rxd data 1 56:27"
"sendok 1 56:27"
>>

((
"Load Listen(2) 56:27"
"Load Tmr(2) 56:27"
"Accept 2 56:27"
"rxd data 2 56:27"
"sendok 2 56:28"
))

<<
"Load Listen(3) 56:28"
"Load Tmr(3) 56:28"
"Accept 3 56:28"
"10053 Connection is aborted due to timeout or other failure 56:28"
"10053 Connection is aborted due to timeout or other failure 56:28"
"rxd data 3 56:28"
"sendok 3 56:28"
>>

((
"Load Listen(4) 56:28"
"Load Tmr(4) 56:28"
"Accept 4 56:28"
"10053 Connection is aborted due to timeout or other failure 56:28"
"10053 Connection is aborted due to timeout or other failure 56:28"
"10053 Connection is aborted due to timeout or other failure 56:28"
"10053 Connection is aborted due to timeout or other failure 56:28"
"rxd data 4 56:28"
"sendok 4 56:28"
"close 4 56:28"
"unload 4 56:28"
))

<<
"Sendwelcome 4 56:28"
"close 3 56:28"
"unload 3 56:28"
"Sendwelcome 4 56:28"
"close 2 56:28"
"unload 2 56:28"
"Sendwelcome 4 56:28"
"close 1 56:28"
"unload 1 56:28"
>>
__________________
Why do croutons come in airtight packages? Aren`t they just stale bread to begin with?

Last edited by Cyberax; 10-01-2002 at 05:28 AM.
Reply With Quote
  #7  
Old 10-01-2002, 07:03 AM
Cyberax's Avatar
Cyberax Cyberax is offline
Centurion
 
Join Date: Sep 2002
Location: Manchester, UK
Posts: 155
Default

I have found an excellent control array at :

http://www.winsockvb.com/tutorials/array/array1.html

which is a user control created by Will Barden his code is a lot
tidier than mine and his control handles events with style.

anyone using simaltaneous winsock connections i reccomend this to you ....


Many thanks to Chief for his help !?
__________________
Why do croutons come in airtight packages? Aren`t they just stale bread to begin with?
Reply With Quote
  #8  
Old 10-01-2002, 09:29 AM
ChiefRedBull's Avatar
ChiefRedBullWinsock Nightmare : 10053 Connection is aborted due to timeout or other failure ChiefRedBull is offline
ISearchGoogle

Retired Moderator
* Expert *
 
Join Date: May 2001
Location: england
Posts: 6,321
Default

Chief == Will Barden

(Mine doesn't do what I suggested to you above, perhaps
I should implement it... when I've got time).
__________________
Chuck Norris ordered a Big Mac at Burger King, and got one.
Reply With Quote
  #9  
Old 10-01-2002, 09:52 AM
Cyberax's Avatar
Cyberax Cyberax is offline
Centurion
 
Join Date: Sep 2002
Location: Manchester, UK
Posts: 155
Default

May be i can implement it to your code and if you approve i may save you some time !
__________________
Why do croutons come in airtight packages? Aren`t they just stale bread to begin with?
Reply With Quote
  #10  
Old 10-01-2002, 10:14 AM
ChiefRedBull's Avatar
ChiefRedBullWinsock Nightmare : 10053 Connection is aborted due to timeout or other failure ChiefRedBull is offline
ISearchGoogle

Retired Moderator
* Expert *
 
Join Date: May 2001
Location: england
Posts: 6,321
Default

It wouldn't take me long, and I've got a lot of other stuff on right
now (WinsockVB is going through a bit of an overhaul), but thanks
for the offer.
__________________
Chuck Norris ordered a Big Mac at Burger King, and got one.
Reply With Quote
  #11  
Old 05-16-2016, 11:19 AM
truerad truerad is offline
Newcomer
 
Join Date: Dec 2014
Posts: 1
Default The same problem

I got the same problem, and i want to learn from this link

winsockvb.com

but this link can not be opened. Is there any other link to go to this page?

Thansk & Regards,
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
 
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
Winsock Nightmare : 10053 Connection is aborted due to timeout or other failure
 
-->