-3

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?

Remi Guan
  • 21,506
  • 17
  • 64
  • 87
krishh
  • 145
  • 2
  • 6

2 Answers2

0

It's up to your application to decide what to ignore.

If you need that functionality, you have to provide information (e.g.: timestamps) in the packets and you have to delay their processing enough so you can recieve the newer packets.

Karoly Horvath
  • 94,607
  • 11
  • 117
  • 176
0

recv() and send() are used for sending and receiving data. Once you have received data using recv(), it's upto whether you want to do something with it or you can just ignore it.

anbocode
  • 53
  • 6