Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Unhappy Socet programming - Plz help me

    Hi ,

    I am new to Linux and network programming.So please bare if I am asking some thing silly and plz guide me in this problem.

    I am have written one client server program.In client side I am writing some data into scoket.But in server I am not able to read the data.But socket is in connected state(This i have verified by printing the peer name using getpeername()).

    My server is getting blocked in read call(). Is the read is a blocking call?.But if I use fflush after write() in my client side program the server is not blocking but reading zero bytes.

    Plz tell me some solution to make the communiation proper in my socket.

  2. #2
    It's impossible to help you without seeing your sources. Best just write a small simple client / server pair and if they don't work, post their sources so others can help. And, yes, read is a blocking system call, unless you specify O_NONBLOCK or do an equivalent thereof.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts