Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
skajake
Visitor

Socket Problems

I am writing a remote in java which opens a socket connection to send the telnet ECP commands. However, if I drop the connection ungracefully (wifi lost, phone crash, etc), the Roku seems to keep that connection open. Until i reboot the Roku, i cannot initiate another telnet connection.

Any ideas how I can manage my socket connection to prevent this?
0 Kudos
1 REPLY 1
EnTerr
Roku Guru

Re: Socket Problems

Probably nothing you can do about it if telnet has no timeout/uses no tcp keepalive/. Said telnet is included for debug purposes and is limited to 1 connection at a time, that's why you can't connect after silent drop of the client.

To avoid waiting for reboot, go to Settings and re-configure the network, that will force drop the telnet. Also consider using Roku ECP, which is way to control the player over http, works nice unlike telnet (recently there was discussion around that Roku2 broke the unsupported remoting over telnet)
0 Kudos