Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

help with sockets blocking in embedded visual C++ prog

Options
  • 08-10-2003 5:58pm
    #1
    Registered Users Posts: 1,259 ✭✭✭


    Hi, just wondering if there are any gurus on embedded visual C++ 3.0 out there who can help me?

    I have a program written which acts as a socket server. The problem is when ever the socket is listening for connections or waiting to receive data it blocks.... I need to be able to access the "iTask" function in windows CE (I'm using an Ipaq 3700, pressing the button on the bottom right brings up this) which brings up a list of the currently running programs and allows you to switch between them.

    When the program is running and blocking this menu will not appear when the button is pressed. The word "Itask" appears at the top of the screen but the menu doesn't appear.

    I've tried making the sockets non-blocking and using select() and sleep() in a loop, but itask still doesn't work while it's sleeping or select is in progress.

    I've tried moving all of socket code to a seperate thread (which I'm pretty sure is a worker thread, not a User Interface thread) but I still have the same problem, I'm out of ideas at this stage and going rather mad.... any suggestions?


Comments

  • Closed Accounts Posts: 423 ✭✭Dizz


    You have marked the socket as non-blocking right? A la ioctlsocket (...) (MSDN)

    Dizz


  • Registered Users Posts: 1,259 ✭✭✭alb


    yup, thanks but it turns out the problem was a another program I was using from a COM object that was minimized and screwing up the display on me.


  • Closed Accounts Posts: 5,564 ✭✭✭Typedef


    Hmm.

    As an alternative and (I'm not sure the Windows CE, API/OS supports it).

    Couldn't you run select(); on the socket?


Advertisement