Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Aggregate multiple telnet connections
#1
Hello,
Fist of all, I am a real newbie with Python but I know some other languages. I hope I will be able to learn Python...

I have 3 devices which send their log via telnet protocol, and an appliance (kinf of telnet client) which connects via telnet to retreive the logs.
My concern is that this appliance can connect to only one remote device.

So I would like to create a script which connects to 3 (or more) different devices with telnet but also listen on telnet protocol so that the appliance will only connect to the script and retrieve all the "aggregated" logs.

Would you please point me on the right direction?

I have played a little bit with telnetlib, but I can't figure out how to parallelize multiple clients and redirect the content to one server.
Quote
#2
Python provides a lot of support for concurrency: https://docs.python.org/3/library/concurrency.html

I would probably start by using Threads and a concurrent queue; each thread connects to a device and puts its log information on the concurrent queue. A different thread accepts connections from the "appliance" and pulls data from the queue and sends it to the appliance.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Select of connections Gupi 1 329 Jun-04-2019, 09:32 AM
Last Post: Gupi

Forum Jump:


Users browsing this thread: 1 Guest(s)