3

I have a pymodbus server running and I'd like to know if a client is connected to it that it is serving. Is there any way to do that? I can't see an obvious way.

I'm using the synchronous server:

pymodbus.server.sync.ModbusTcpServer
Mr. Fegur
  • 797
  • 1
  • 6
  • 18
  • What do you mean kind of serving, a ModbusServer could serve to each client with their requesting packet and response to them by its own built-in functionality. – Benyamin Jafari Jan 31 '19 at 16:07
  • I just want to know if a client is connected to it. This helps debug clients that are like black boxes and don't tell you if they have established a connection with the server, so I'd like the server itself to just spit out a message or have a callback or update a variable (num of connected clients) every time a client connects. – Mr. Fegur Jan 31 '19 at 17:48
  • You could get the Modbus server logging which tells you some information like client connection, if you want to do this I can put on a post. – Benyamin Jafari Jan 31 '19 at 19:02

0 Answers0