Results 1 to 2 of 2
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-27-2007 #1Just Joined!
- Join Date
- Jul 2007
- Posts
- 1
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.
- 07-29-2007 #2Just Joined!
- Join Date
- Nov 2004
- Posts
- 4
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.
Thanks
Guennadi


Reply With Quote
