title: Are there any good APIs for maintaining an open connection between Flash <--> Java
body: <p>I have a flash app which will send/receive a constant stream of data. </p>
  
  <p>the flash app should open a connection to the Java server, keep it open, and attempt to reconnect on socket failure.</p>
  
  <p>Are there any good APIs that offer this functionality? Smartfox Server is one option, but if I had my way I'd embed an API in my app rather than contort my app to run under Smartfox.</p>
  
  <p>Ideally it would offer an API on the flash end, another on the Java end, and efficiently (java nio preferably) handle the network component in between. I would just define handlers on both the client &amp; server.</p>