Questions tagged [recv]

BSD Sockets function used for receiving data from a TCP socket.

670 questions
-1
votes
3 answers

blocking recv() that receives no data (TCP)

I'm attempting to write a simple server using C system calls that takes unknown byte streams from unknown clients and executes specific actions depending on client input. For example, the client will send a command "multiply 2 2" and the server…
Lycus
  • 410
  • 1
  • 6
  • 15
-1
votes
1 answer

Basic Send() and Recv() TCP server and client C++

Still trying to understand the send() and recv() functions. Why isn't this working? Nothing prints out on the server output.(except for some Test "cout"s) This is basically the part of the code I'm messing with. CLIENT SIDE: char *mesg_to_send; …
joetaiijo
  • 1
  • 1
-2
votes
3 answers

TCPconnection: server doesn't 'understand' that receiving is over

I'm dealing with a problem on the tcp connection I'm building. When, sending datas from client to server, the server seems to "wait"(not so obvious to me why) for another 'recv()' and the client never exits, as it has finished the sending part and…
FILIaS
  • 495
  • 4
  • 13
  • 26
-2
votes
1 answer

C socket, recv lose data

I made a TCP client/server, and i want send request, but recv function lose data (3rd first bytes of buffer sended) I have tried a lots of things: -put printf everywhere -change port number -change/optimized my code -use wireshark -use flags…
lcocozza
  • 5
  • 3
-2
votes
1 answer

How to fix recv merging multiple TCP segments into a single one?

I have two peers: Alice and Bob. Bob is trying to send Alice the list of peers known to him. First, Bob tells Alice how many peers he has, then he sends n strings with the information about peers to Alice. Here's the code for Bob: if…
Radical Ed
  • 178
  • 2
  • 13
-2
votes
1 answer

C++ | TCP - receive

i need help... i spend much time to write a tcp connection to transfer an image from server to client. The problem is, that it looks like that the client didnt receive all bytes. Server output: Anfrage erhalten: img_size...Imagesize…
xion
  • 61
  • 1
  • 8
-2
votes
2 answers

C socket programming receiving unknown length of data

Hi I designed a code to get the length of unknown data coming in to the socket I need help because I can't find where my code get stuck in this function. Thanks for any help int recvlen(int s){ //peak all received data and returns the length …
정영목
  • 1
  • 2
-3
votes
2 answers

Supress recv() function in python socket programming

Is there any way to supress recv() function in python socket programming?? Suppose server sent a recv() to client before getting data from client server sent another recv() to client Then the first recv() should be ignored. Is this possible?
krishh
  • 145
  • 2
  • 6
-3
votes
1 answer

Recv returning zero incorrectly

I have an interesting problem, I send bytes of data to my server, from my client, and the recv() function always returns zero. I have verified that the function is indeed getting the data and placing it into the char array correctly. It just…
-5
votes
1 answer

When calling recv() the program works very slowly

My code is: http://ideone.com/nVXIQ. recv() functions always idling (it works very slow); it takes several seconds to get the result, and recv() should handle quickly such small amount of data.
Secret
  • 2,627
  • 7
  • 32
  • 46
1 2 3
44
45