recv

How to read reply from socket in c?

I'm trying to write a TCP client that does the following things: 1. Establish TCP connection to webserver 2. Accept GET request command from user's console 3. Client should get a reply back from webserver after each GET request. I'm having a difficult time for the 3rd condition. I did not receive any response back from the webserver. ...

General question about winsock's recv-function

Hi, I've got a general question about the recv-function of winsock. I write a programm with a client/server-architecture where the client sends a camera image to the server and the server sends another image back to the client. The client sends serveral images until the program is closed. And the server will responds every received imag...

Winsock local loop-back latency

I'm using tcp sockets to provide interprocess communication between two apps on Windows XP. I chose tcp sockets for various reasons. I'm seeing an average round-trip time of 2.8 ms. That's much slower than I was expecting. Profiling seems to show that the delay is between one app calling send and the other end's blocking recv returning. ...

Behaviour of recv on a non-blocking TCP socket before connection completion

Friends, I have a non-blocking TCP socket (on AIX). When I attempted connect() I got EINPROGRESS. My question is if I call recv() before connection completion, what would be the (most apprpriate) error code? I saw that, in case connection fails, and I call recv(), I got ECONNREFUSED; means I got an error corresponding to my earlier con...