Results 1 to 5 of 5

Thread: What does it mean...

  1. #1

    Thread Starter
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125

    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
    <removed by admin>

  2. #2
    Addicted Member Bazza81's Avatar
    Join Date
    Apr 2001
    Location
    Nottingham, UK
    Posts
    203

    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!

  3. #3

    Thread Starter
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    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...
    <removed by admin>

  4. #4
    Addicted Member Bazza81's Avatar
    Join Date
    Apr 2001
    Location
    Nottingham, UK
    Posts
    203
    Have you tried throwing so DoEvents in there?
    Who needs rhetorical questions anyway?


    Bazza NET - The place you want to be!

  5. #5

    Thread Starter
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    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:
    1. Private Declare Function GetTickCount Lib "kernel32" () As Long
    2. Public Sub Wait(milliseconds As Integer)
    3. Dim OldTime As Long
    4. OldTime = GetTickCount
    5. Do Until GetTickCount >= OldTime + milliseconds
    6.     DoEvents
    7. Loop
    8.  
    9. End Sub
    <removed by admin>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width