Thread: C socket recv in a infinite loop.

  1. #1
    Registered User
    Join Date
    Sep 2014

    C socket recv in a infinite loop.

    I have the following code, which I intend to recieve messages form a server but for now it recieves only on send.

    linux-daemon-interface/network at master * heatblazer/linux-daemon-interface * GitHub

    It`s a lot of code so please just refer to the csocket.cpp the run(...) function to tell me if I can receive the messages that way?


  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Your threads and mutexes are a confused mess.

    I would suggest you read the beej tutorials and try and make a simplified single-threaded version of what you're trying to do.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 10-14-2011, 11:33 PM
  2. socket program:using the read() instead of recv()
    By vlrk in forum C Programming
    Replies: 8
    Last Post: 05-17-2011, 09:46 PM
  3. help with socket send/recv
    By ac251404 in forum Networking/Device Communication
    Replies: 10
    Last Post: 06-29-2006, 07:32 PM
  4. recv on nonblocking socket
    By l2u in forum Networking/Device Communication
    Replies: 4
    Last Post: 05-20-2006, 07:02 PM
  5. socket programming recv function
    By vicky in forum Linux Programming
    Replies: 2
    Last Post: 10-29-2001, 03:39 AM

Tags for this Thread