Menu

problems with SocketService / SocketPort

Help
2000-07-16
2000-07-17
  • Jens Taprogge

    Jens Taprogge - 2000-07-16

    Hi,

    I am experiencing problems with a program using SocketService / Port similar to demo/tcpservie.c. In fact it was initially derived from that program.
    The problem is, that once all client disconnect from the server it eats up all cpu usage. I delete the SocketPort class instance when the last client disconnects and it is being removed from the SocketService port list.
    I inserted an output line right behind

    port=first
    while(port)

    in SocketService::Run (the big loop). It is normally not being called after the deletion of the last SocketPort.
    Sometimes though it is.... and then it just goes nuts.

    Also the programm generates an extra thread when the last connection is closed. That thread is the one eating all the cpu time.

    Sometimes the cpu usage goes back to a normal level when I reconnect to the program.

    Any ideas, suggestions or comments on this problem would be greatly appreciated.

    Best Regards
    Jens

     
    • Jens Taprogge

      Jens Taprogge - 2000-07-17

      I found the bug myself. I am going to post what I think is a bugfix to the problem.

      Hope noone looked into it too much yet.

      Regards
      Jens

       
      • David Sugar

        David Sugar - 2000-07-17

        I will look at it when it's posted.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.