Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Socket.Select() Bug?

Socket.Select() Bug?

Scheduled Pinned Locked Moved C#
helpsysadmintestingbeta-testingquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    obelisk29
    wrote on last edited by
    #1

    Hi am writing a chat server and I was stress testing my server and found some errors. Say I have an arraylist. ArrayList sockets = new ArrayList(listOfSockets); Now I call Socket.Select to take out the sockets that don't have data on them. Socket.Select(sockets, null, null, 100000000); This is where the error happens, if I pass in a ArrayList that has 65 sockets in it. It causes a IndexOutOfRangeException to happen. I have tried using other ways of doing it and it causes different errors but it always happens when it reaches 65 sockets. I am dumbfounded please help. ------------------ I'm naked under my clothes...

    L 1 Reply Last reply
    0
    • O obelisk29

      Hi am writing a chat server and I was stress testing my server and found some errors. Say I have an arraylist. ArrayList sockets = new ArrayList(listOfSockets); Now I call Socket.Select to take out the sockets that don't have data on them. Socket.Select(sockets, null, null, 100000000); This is where the error happens, if I pass in a ArrayList that has 65 sockets in it. It causes a IndexOutOfRangeException to happen. I have tried using other ways of doing it and it causes different errors but it always happens when it reaches 65 sockets. I am dumbfounded please help. ------------------ I'm naked under my clothes...

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      100000000 milliseconds = 27 hours 46 min .... etc xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups