Thread: recv issue

  1. #1
    Registered User
    Join Date
    Sep 2002

    Unhappy recv issue

    I've got the connect to server working fine, but the issue is of receive, when I invoke receive the thread hangs!!!
    Please advice..
    Here's the extract of the code
    while ( ii != 0)
    ii = recv(sd,aa,1000,0);
    printf("%d %s",ii,aa);

    Any Help would be Appreciated a lot!!!


  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Your code isn't C++, please post on an appropriate board in future.

    Please read this thread regarding code tags.

    In answer to your question, I'd guess its hanging because the socket is blocking (ie waiting for incoming data).

    You can read about socket programming here.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question about recv
    By carrotcake1029 in forum Networking/Device Communication
    Replies: 2
    Last Post: 02-26-2009, 02:10 PM
  2. float calculation issue
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 05-26-2008, 04:56 AM
  3. recv()
    By afisher in forum Networking/Device Communication
    Replies: 3
    Last Post: 03-24-2004, 05:32 PM
  4. my first issue of GDM
    By DavidP in forum A Brief History of
    Replies: 0
    Last Post: 09-12-2002, 04:02 PM
  5. non blocking recv
    By rohit in forum Linux Programming
    Replies: 4
    Last Post: 03-05-2002, 09:35 PM