0

I am using the server-client programs as stated in this answer. But I am not sure how to check the number of enqueued requests.

When the client sends requests to the server, those requests are queued, (most probably handled by the OS). But I would like to check the number of enqueued requests.

Abhay Patil
  • 389
  • 5
  • 19

1 Answers1

1

With a TCP socket, there's no way to tell. You can find out whether there is nothing or something, but not how much data. If you need that kind of thing, you might consider using a multiprocessing.Queue instead. It is unidirectional, but it has a qsize method that tells you how many items are waiting.

Tim Roberts
  • 48,973
  • 4
  • 21
  • 30