connection refused
Wjrich
Posts: 8
Hi all, I'm working on project with 20 Barix Exstreamer auido decoders and I would like to get progress feedback from each unit. I can get feedback from one unit at a time, but if I try more than one I get a connection refused error on all but the first one. I defined 20 ports for feedback, is it possible that there is a limit of one open port at a time?
0
Comments
After a song is played, I send a command to check the state. If it's playing then a command is sent to the device to enable progress feedback on the tcp command interface, last IP_CLIENT_OPENT is sent and thats where I get the connection refused error if feedback is already being sent from another device.
First I would create an array to track online/offline events for each port/connection you need and then I would also create array of queues to hold the strings you need to send for each connection. Then use timeline or a loop in define_program (behind a small wait to keep it form running on every pass) to check your queues for traffic to send. If there's traffic to send and the online/offline status being tracked for that port is offline then call a function to do your ip_client_open for that port and when you get your online event trigger send your traffic and change you online/offline status to online. When the http server is done with your traffic it should automatically close the port and you'll get an offline event which you can use to reset your online/offline flag. This way you will only open a port when it is closed and it will automatically re-connect if you have more than one command in the queue every time the timeline event triggers or wait in define_progam expires. You can also put your function call in the offline event handler to immediately check the queue if you want to speeds things up..
Like:
All the Barix decoders are physically different devices with different IP addresses correct?
Are they all using the same internal port for connections? Can they be changed? If so try putting them on different ports. Of course you shouldn't have to since they are all appended to their ip address so there isn't a need for internal NAT.
Post more code?
also each barix has a port for feedback since feedback is transmitted over port 12302, the TCP command interface.
--John
Send_string Streamers[vstreamtocontrol[active touch panel]] ? Just trying to follow your array.