You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Jairo <ja...@fusoti.com.br> on 2017/02/14 19:13:25 UTC
Socket implementation
I´m developing a Mobile App with Flex and I need a connection with sockets. I
downloaded Flashsocket. It connects and sends data with no problem, but if
connection goes out, don´t reconnect.
Anyone saw this with Flashsocket or have some better socket implementation?
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Socket-implementation-tp14684.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Socket implementation
Posted by Clint M <cm...@gmail.com>.
Looks like it's a known issue with a workaround proposed.
https://github.com/simb/FlashSocket.IO/issues/21
On Tue, Feb 14, 2017 at 11:52 AM, Jairo França <ja...@fusoti.com.br> wrote:
> Thanks Clint.
>
> I´m listening for the events.. The connection event fires but the
> disconnect event don´t.
>
> If I turn off my wi-fi the log window shows a message "webSocketError:
> Server Timed Out!!", but don´t fire a disconnect.
>
> The Android implementation of socket.io that I used in another project
> reconnects automatically, as soon as the network wakes.
>
Re: Socket implementation
Posted by Jairo França <ja...@fusoti.com.br>.
Thanks Clint.
I�m listening for the events.. The connection event fires but the
disconnect event don�t.
If I turn off my wi-fi the log window shows a message "webSocketError:
Server Timed Out!!", but don�t fire a disconnect.
The Android implementation of socket.io that I used in another project
reconnects automatically, as soon as the network wakes.
Em 14/02/2017 17:21, Clint M escreveu:
> make sure you're listening for and handling all the FlashSocketEvent events\u2026
> (e.g. DISCONNECT)
>
> package com.pnwrain.flashsocket.events
> {
> import flash.events.Event;
>
> public class FlashSocketEvent extends Event
> {
> public static const CLOSE:String = "close";
> public static const CONNECT:String = "connect";
> public static const MESSAGE:String = "message";
> public static const IO_ERROR:String = "ioError";
> public static const SECURITY_ERROR:String = "securityError";
> public static const DISCONNECT:String = "disconnect";
> public static const CONNECT_ERROR:String = "connectError";
>
> public var data:*;
>
> public function FlashSocketEvent(type:String, bubbles:Boolean=true,
> cancelable:Boolean=false)
> {
> super(type, bubbles, cancelable);
> }
> }
> }
>
>
> On Tue, Feb 14, 2017 at 11:13 AM, Jairo <ja...@fusoti.com.br> wrote:
>
>> I�m developing a Mobile App with Flex and I need a connection with
>> sockets. I
>> downloaded Flashsocket. It connects and sends data with no problem, but if
>> connection goes out, don�t reconnect.
>> Anyone saw this with Flashsocket or have some better socket implementation?
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://apache-flex-users.
>> 2333346.n4.nabble.com/Socket-implementation-tp14684.html
>> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>
--
Re: Socket implementation
Posted by Clint M <cm...@gmail.com>.
make sure you're listening for and handling all the FlashSocketEvent events…
(e.g. DISCONNECT)
package com.pnwrain.flashsocket.events
{
import flash.events.Event;
public class FlashSocketEvent extends Event
{
public static const CLOSE:String = "close";
public static const CONNECT:String = "connect";
public static const MESSAGE:String = "message";
public static const IO_ERROR:String = "ioError";
public static const SECURITY_ERROR:String = "securityError";
public static const DISCONNECT:String = "disconnect";
public static const CONNECT_ERROR:String = "connectError";
public var data:*;
public function FlashSocketEvent(type:String, bubbles:Boolean=true,
cancelable:Boolean=false)
{
super(type, bubbles, cancelable);
}
}
}
On Tue, Feb 14, 2017 at 11:13 AM, Jairo <ja...@fusoti.com.br> wrote:
> I´m developing a Mobile App with Flex and I need a connection with
> sockets. I
> downloaded Flashsocket. It connects and sends data with no problem, but if
> connection goes out, don´t reconnect.
> Anyone saw this with Flashsocket or have some better socket implementation?
>
>
>
>
>
> --
> View this message in context: http://apache-flex-users.
> 2333346.n4.nabble.com/Socket-implementation-tp14684.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>