Socket + Android handling errors

55 views
Skip to first unread message

Tomek K

unread,
Jul 11, 2013, 9:27:03 AM7/11/13
to haxe...@googlegroups.com
code:
trace("start");
var socket = new Socket();
socket.setBlocking(false);
socket.connect(new Host("google.com"), 8001);
trace("end");

Application freezes after connect. Is there any way to handle servers that refuse connection or servers that are down?
I have already tried try...catch but it cannot handle this.

Ali Jaya Meilio Lie

unread,
Jul 11, 2013, 8:48:06 PM7/11/13
to haxe...@googlegroups.com
how about making a new Thread or set the timeout?
> --
> To post to this group haxe...@googlegroups.com
> http://groups.google.com/group/haxelang?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Haxe" group.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

Stephane Le Dorze

unread,
Jul 12, 2013, 3:22:30 AM7/12/13
to haxe...@googlegroups.com
You mean, it 'freezes' for ever.. ???
Reply all
Reply to author
Forward
0 new messages