wikiti / extension-networking

Library developed for OpenFL to facilitate connections between applications, using TCP sockets, and following the scheme of event-driven programming.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Would love html5 support

PXshadow opened this issue · comments

commented

currently building a creation, idea, problem database app in openfl, however a simple html5 version would be very helpful for marketing and in order to reach a wider audience.

Hello, @PXshadow

I'll try to check if this can be achieved among this week by using this flash-javascript trick.

Best regards,
Daniel

commented

Thank you I really appreciate any effort what's so ever good luck!

After some research, I could not make the javascript trick mentioned above work. Instead of using flash sockets, I think that WebSockets should be used on the server-side. Therefore, a HTTP WebSocket server must be implemented on Haxe within this library (somewhere in the networking.sessions.server package). Here is a brief article on how to build one in Java.

Possible TODO list:

  • Create a new server called WebServer to allow WebSockets connections.
  • Create a new client called WebClient to allow non-web clients (cpp, android, neko...) to use WebSockets and connect to WebServers. This library may be used for this purpose.

Since I'm not currently interested on HTML5 support, I won't implement this in short term. Feel free to create Pull Requests if you want to implement this feature.

Best regards,
Daniel

commented

Would it be possible to connect to the preexisting server that I have made with openfl exstension networking and make a websocket client to be able to connect and send dynamic data to? Also thanks for the answer I appreciate the effort.

Since WebSockets use their own protocol (HTTP 1.1), which is not compatible with the current pseudo-protocol used on this library, it is not possible to connect them. To do that, the current server and clients must be modified to use HTTP connections instead of pure TCP.