|
-
Dec 12th, 2001, 01:28 AM
#1
Thread Starter
PowerPoster
What does it mean...
What does it mean when "No Buffer space is available" when using Winsock? Is there a way to fix this? I am looping through all the IP addresses on my network to see which machines respond to a connection.
Thanks
-Joey
-
Dec 12th, 2001, 01:54 AM
#2
Addicted Member
Buffer
Are you closing Winsock each time, becuase it uses a buffer to hold connection attempts I think. When looping through all the I.P address's try and clear Winsocks memory by closing it each time or something similar. Hope it helps!
Who needs rhetorical questions anyway?
Bazza NET - The place you want to be!

-
Dec 12th, 2001, 02:01 AM
#3
Thread Starter
PowerPoster
Yeah I am closing the winsock at the end of each connect. It just connects long enough to get the IP, adds it to a list then closes the winsock, and continues on. Then, once I am done with that loop I want to loop through the IPs that it found and connect on those machines through my specific port and program, and send the message "SHUTDOWN" then continue through the list.
Just for some background, I am making a program that runs on all the machines in our computer lab at school, and it shuts down all the computers from the teachers computer. He's giving me an A for the semester if I can do this successfully...
-
Dec 12th, 2001, 02:06 AM
#4
Addicted Member
Have you tried throwing so DoEvents in there?
Who needs rhetorical questions anyway?
Bazza NET - The place you want to be!

-
Dec 12th, 2001, 02:15 AM
#5
Thread Starter
PowerPoster
Yes I have DoEvents in there, a couple of times actually. I figured out that I just need to allow more time between requests, so I made a little timer function to freeze it while still letting winsock do it's thing:
VB Code:
Private Declare Function GetTickCount Lib "kernel32" () As Long
Public Sub Wait(milliseconds As Integer)
Dim OldTime As Long
OldTime = GetTickCount
Do Until GetTickCount >= OldTime + milliseconds
DoEvents
Loop
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|