Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

help with sockets blocking in embedded visual C++ prog

  • 08-10-2003 05:58PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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,563 ✭✭✭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