HTTP-tunneling for flash-client

  • Sebastian Eichner

    Hi all!

    I just wanted to let you know that i started to work on a http-tunnel for the flash-client. This includes an apropriate servlet on the server-side as well as a new flash-client-library which is capable to communicate via the servlet.

    With this it will be possible to use the flash-client through firewalls which normally would block the socket-communication with nfc.

    Have a nice week,

    • Sebastian Eichner

      Okay, i finally finished the http-tunnel for flash - now the flash-client works even through firewalls! :-))

      You can find the modified code on I will not add another patch to the Patches-section as i think it is easier to download the full source with patches already applied.

      The download also contains a http-enabled version of my chatclient (see url above). This chatclient includes two chat-engines: one based on ajdigital's (nfcSocketEngine.swf, nearly identical to the original one) and a new one which uses EXACTLY the same interface but implements http-tunneling (nfcHttpEngine.swf). The client first tries to connect to a socket, and if this fails it falls back to a http-connection.

      nfcHttpEngine.swf can be used with any existing chat-client! It should be as simple as exchanging nfcEngine.swf agains nfcHttpEngine.swf (e.g. by renaming the file).

      I will write a short changelog in a second post.

      So, please test if this works! It does so for me, and on a modified nfc-version we use this since about 4 weeks without problems.

      nfc rules! ;-)

    • Sebastian Eichner

      Changelog for the http-tunnel:
      (mainly for developers)

      - "id" for client is no longer set and sent in ServletConnectionHandler, but now (as all commands) by
      ChatClient.idGivenByServer(String id)
      CommandMakerRemote.constructIDGivenByServer(String id)

      - Message/FlashMessage constructor expected ConnectionHandler, but IConnectionHandler should be more apropriate

      - ServletFlashMessage added
      - String Message.getMessage() added
      - POST/GET combined in TunnelServlet (now you can call both)
      - "...&type=flash" in servle-url to use flash-style-communication (xml-based)
      - web.xml: added servlet-mapping which is required by current tomcats (it took me quite some time to figure this out...)

      When deploying the new nfc.war from the download-location in my previous post, you can access e.g. localhost:8080/nfc/flash2/ to test the tunneling. nfcHttpEngine.swf is the communication-library and implements the same interface like nfcSocketEngine.swf (nearly identical to ajdigitals orginial nfcEngine.swf).



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks