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 / C++ / MFC
  4. select and accept socket calls

select and accept socket calls

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminhelpquestion
3 Posts 3 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.
  • V Offline
    V Offline
    vikramlinux
    wrote on last edited by
    #1

    Hi Friends, My software server listens on a particular port using dedicated "listener thread" . We accept the connections from client and serve this request on different threads. Under high input requests from client (12000 approx/sec), the "listener thread" dies. Any suggestion for this kind of problem? Currently it looks to me that the select or accept call is possibly the reason behind. Should we use pselect or simialr to this? ~ Vikram S

    Richard Andrew x64R C 2 Replies Last reply
    0
    • V vikramlinux

      Hi Friends, My software server listens on a particular port using dedicated "listener thread" . We accept the connections from client and serve this request on different threads. Under high input requests from client (12000 approx/sec), the "listener thread" dies. Any suggestion for this kind of problem? Currently it looks to me that the select or accept call is possibly the reason behind. Should we use pselect or simialr to this? ~ Vikram S

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      vikrams wrote:

      the "listener thread" dies.

      Please clarify "dies." Is there an error?

      The difficult we do right away... ...the impossible takes slightly longer.

      1 Reply Last reply
      0
      • V vikramlinux

        Hi Friends, My software server listens on a particular port using dedicated "listener thread" . We accept the connections from client and serve this request on different threads. Under high input requests from client (12000 approx/sec), the "listener thread" dies. Any suggestion for this kind of problem? Currently it looks to me that the select or accept call is possibly the reason behind. Should we use pselect or simialr to this? ~ Vikram S

        C Offline
        C Offline
        Chuck OToole
        wrote on last edited by
        #3

        Well, the first place I would look for is running out of memory. Depending on how you create the thread (_beginthreadex / CWinThread class / whatever) if you are creating a thread for each of the 12000/second arrivals, you might run out of some resource. You might check for stack size too, if I remember correctly, each thread gets a stack and that's taken off the end of your stack so, eventually, there'll be some overlap. I'm a bit foggy on that but it caused me problems in the past and I had to build the app with a larger stack size.

        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