WebSocket Support to ActionScript 3 API

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

User avatar
mete2221
Posts: 53
Joined: 30 Aug 2017, 17:01

WebSocket Support to ActionScript 3 API

Postby mete2221 » 13 Nov 2019, 18:40

We use SFS more than 5 years. We had to deal with huge size of attacks these days. So we proxied the server with Cloudflare now. As our game's client is as3 so we dont have the chance to use websocket api. An actionscript library will be nice to have because the bluebox has some connection issues and so slow especially in connection.

Flash native does not support WebSocket, but it is possible to establish a websocket connection with a library.
Please add support websocket to ActionScript 3 API

AS3 Web Socket Library: https://github.com/theturtle32/AS3WebSocket
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: WebSocket Support to ActionScript 3 API

Postby Lapo » 14 Nov 2019, 08:08

Hi,
I am not sure I understand what is the reason to replace TCP socket with websocket?

I guess it has to do with how Cloudflare reverse proxy works? Though I am not familiar with the service.
Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
mete2221
Posts: 53
Joined: 30 Aug 2017, 17:01

Re: WebSocket Support to ActionScript 3 API

Postby mete2221 » 14 Nov 2019, 11:30

Lapo wrote:Hi,
I am not sure I understand what is the reason to replace TCP socket with websocket?

I guess it has to do with how Cloudflare reverse proxy works? Though I am not familiar with the service.
Thanks

I'am ported websocket api to sfs2x as3 api. (for now adobe air only)
Based SFS2X AS3 API v1.0.3

Download Link: https://www.mediafire.com/file/wnqvggj6w3ipv8e/SmartFoxPlusExample.rar/file


Note: It is an experimental build, not recommended for production.
Last edited by mete2221 on 14 Nov 2019, 16:02, edited 1 time in total.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: WebSocket Support to ActionScript 3 API

Postby Lapo » 14 Nov 2019, 15:47

Hi,
I would have liked to understand exactly why do you require websocket over regular TCP sockets? Did you read my question in the previous post?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
mete2221
Posts: 53
Joined: 30 Aug 2017, 17:01

Re: WebSocket Support to ActionScript 3 API

Postby mete2221 » 14 Nov 2019, 16:14

Lapo wrote:Hi,
I would have liked to understand exactly why do you require websocket over regular TCP sockets? Did you read my question in the previous post?

Thanks


Cloudflare does only support http protocol, and socket protocol does not work.

Maybe you can suggest a socket-based firewall that allows country-based filters?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: WebSocket Support to ActionScript 3 API

Postby Lapo » 14 Nov 2019, 17:14

mete2221 wrote:
Lapo wrote:Hi,
I would have liked to understand exactly why do you require websocket over regular TCP sockets? Did you read my question in the previous post?

Thanks


Cloudflare does only support http protocol, and socket protocol does not work.

Maybe you can suggest a socket-based firewall that allows country-based filters?

Okay I see.
I am not a firewall expert but any firewall operates at socket level. What do you mean by country-based? You need to filter IP ranges coming from a specific country? If that's the case any firewall will do.

As regards adding websocket support for the AS3 API, we don't have plans for this integration in the immediate future. If you want we can provide the API sources so you can integrate the library you've mentioned yourself.
But before you do that it's probably best to understand what sort of firewall requirement you need. Have you tried asking your current hosting provider?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
mete2221
Posts: 53
Joined: 30 Aug 2017, 17:01

Re: WebSocket Support to ActionScript 3 API

Postby mete2221 » 14 Nov 2019, 19:08

Lapo wrote:
mete2221 wrote:
Lapo wrote:Hi,
I would have liked to understand exactly why do you require websocket over regular TCP sockets? Did you read my question in the previous post?

Thanks


Cloudflare does only support http protocol, and socket protocol does not work.

Maybe you can suggest a socket-based firewall that allows country-based filters?

Okay I see.
I am not a firewall expert but any firewall operates at socket level. What do you mean by country-based? You need to filter IP ranges coming from a specific country? If that's the case any firewall will do.

As regards adding websocket support for the AS3 API, we don't have plans for this integration in the immediate future. If you want we can provide the API sources so you can integrate the library you've mentioned yourself.
But before you do that it's probably best to understand what sort of firewall requirement you need. Have you tried asking your current hosting provider?

Thanks


Both game web site and game server are hosted on AWS. The protection Amazon offers is too expensive to afford.
As we can not install our firewall hardware to aws warehouse we must to use a Saas.

Cloudflare was the best option due to its features and prices.

These attacks -nearly 5Gbit- comes from all over the world. And our game has most of its users from Turkey and Mena. So when attack starts we deny all other country traffic.

Return to “SFS2X ActionScript 3 API”

Who is online

Users browsing this forum: No registered users and 15 guests