gimite / web-socket-js

HTML5 Web Socket implementation powered by Flash
BSD 3-Clause "New" or "Revised" License
2.73k stars 489 forks source link

Pure .as example and class #84

Closed ghost closed 13 years ago

ghost commented 13 years ago

https://github.com/puppetMaster3/Gamina-Core/tree/master/asSrc/org/gamina/srv

WebSocketAs file is the code that I'd like to be added here. It allows for pure .as use of websocket. Main change is making webSockets:Array protected and removing external interface. I'd like for this project to start distributing a swc, not just swf like now. There are 3MM .as developers, and we need a websocket also.

WebSock is example use.

gimite commented 13 years ago

As I said in #77 , I believe using WebSocket class directly is better.

ghost commented 13 years ago

I believe that is what I am doing, I am not using main.

gimite commented 13 years ago

I mean, your WebSockAs and WebSock class may be needless. Directly using WebSocket class in BaseJWebSSrv.as may not add much complication. (I haven't tried so I may be wrong.) Of course you can keep your code in your project, but as a sample code of web-socket-js, it may be too complicated.

ghost commented 13 years ago

OK, let me leave the .as code in my project.

gimite commented 13 years ago

Sorry "may not be needless" → "may be needless"