writing a haxe server targeting neko

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

writing a haxe server targeting neko

edA-qa mort-ora-y
Can somebody give me a good reference, or examples, on how to write a
server for the neko target?

I need to handle multiple connected sockets and read data from all of
them without blocking.  I don't need multithreading.

Also, does somebody know how to set a socket/http read/write timeout?

--
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

BigTPoker uses haXe and DHLIB
        http://BigTPoker.com/?source=haxe-list

The dis-Emi-A haXe Library
        http://wiki.disemia.com/HaXe
       
A full set of tools, classes, and support facilities aimed at
simplifying and expediting game creation in Flash 9.

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.


--
haXe - an open source web programming language
http://haxe.org

signature.asc (260 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: writing a haxe server targeting neko

Nicolas Cannasse
edA-qa mort-ora-y a écrit :
> Can somebody give me a good reference, or examples, on how to write a
> server for the neko target?
>
> I need to handle multiple connected sockets and read data from all of
> them without blocking.  I don't need multithreading.
>
> Also, does somebody know how to set a socket/http read/write timeout?

Look at neko.net.ThreadServer and neko.net.ThreadRemotingServer

Nicolas

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: writing a haxe server targeting neko

edA-qa mort-ora-y
Nicolas Cannasse wrote:
> Look at neko.net.ThreadServer and neko.net.ThreadRemotingServer

Those look to do about what I want. Is there an example somewhere?

--
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

BigTPoker uses haXe and DHLIB
        http://BigTPoker.com/?source=haxe-list

The dis-Emi-A haXe Library
        http://wiki.disemia.com/HaXe
       
A full set of tools, classes, and support facilities aimed at
simplifying and expediting game creation in Flash 9.

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.


--
haXe - an open source web programming language
http://haxe.org

signature.asc (260 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: writing a haxe server targeting neko

blackdog-2
In reply to this post by edA-qa mort-ora-y
Here's a simple example, based on ServerLoop it requires some C for http
request parsing (mongrel stuff), if you're interested in actually
running it, i'll send that too.

On Fri, 2009-10-09 at 15:02 +0200, edA-qa mort-ora-y wrote:

> Can somebody give me a good reference, or examples, on how to write a
> server for the neko target?
>
> I need to handle multiple connected sockets and read data from all of
> them without blocking.  I don't need multithreading.
>
> Also, does somebody know how to set a socket/http read/write timeout?
>
> --
> haXe - an open source web programming language
> http://haxe.org

--
haXe - an open source web programming language
http://haxe.org

HttpdResponse.hx (4K) Download Attachment
Server.hx (5K) Download Attachment
Servlet.hx (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: writing a haxe server targeting neko

Lee Sylvester
blackdog wrote:

> Here's a simple example, based on ServerLoop it requires some C for http
> request parsing (mongrel stuff), if you're interested in actually
> running it, i'll send that too.
>
> On Fri, 2009-10-09 at 15:02 +0200, edA-qa mort-ora-y wrote:
>  
>> Can somebody give me a good reference, or examples, on how to write a
>> server for the neko target?
>>
>> I need to handle multiple connected sockets and read data from all of
>> them without blocking.  I don't need multithreading.
>>
>> Also, does somebody know how to set a socket/http read/write timeout?
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>>    
>
>  
Also, if you go to ffdmag.com, you can download the issue with my
tutorial on writing multiuser apps in haXe... I don't know what issue it
is, though ;-)

Lee

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: writing a haxe server targeting neko

edA-qa mort-ora-y
In reply to this post by blackdog-2
blackdog wrote:
> Here's a simple example, based on ServerLoop it requires some C for http
> request parsing (mongrel stuff), if you're interested in actually
> running it, i'll send that too.

ServerLoop seems to do what I'll need. Does it differ from ThreadServer
only in that it is single threaded? They both otherwise seem to have the
same purpose.

Is ServerLoop.clientWrite asynchronous?

Is the ServerLoop itself non-blocking?  That is, it doesn't spin in a
loop somewhere waiting for data or to call update?  I need to have
several running on one machine (each in a different VM).

Is "listenCount" the total number of clients, or the traditional C-api
"listen" count specifying the number of waiting connections?

--
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

BigTPoker uses haXe and DHLIB
        http://BigTPoker.com/?source=haxe-list

The dis-Emi-A haXe Library
        http://wiki.disemia.com/HaXe
       
A full set of tools, classes, and support facilities aimed at
simplifying and expediting game creation in Flash 9.

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.


--
haXe - an open source web programming language
http://haxe.org

signature.asc (260 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: writing a haxe server targeting neko

Michiel Crefcoeur
In reply to this post by Lee Sylvester
Here it is:
http://ffdmag.com/magazine/826-flash-games-programmer

2009/10/9 Lee McColl Sylvester <[hidden email]>
blackdog wrote:
Here's a simple example, based on ServerLoop it requires some C for http
request parsing (mongrel stuff), if you're interested in actually
running it, i'll send that too.

On Fri, 2009-10-09 at 15:02 +0200, edA-qa mort-ora-y wrote:
 
Can somebody give me a good reference, or examples, on how to write a
server for the neko target?

I need to handle multiple connected sockets and read data from all of
them without blocking.  I don't need multithreading.

Also, does somebody know how to set a socket/http read/write timeout?

--
haXe - an open source web programming language
http://haxe.org
   

 
Also, if you go to ffdmag.com, you can download the issue with my tutorial on writing multiuser apps in haXe... I don't know what issue it is, though ;-)

Lee


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: writing a haxe server targeting neko

Thomas-8
In reply to this post by edA-qa mort-ora-y
> Can somebody give me a good reference, or examples, on how to write a
> server for the neko target?
>
> I need to handle multiple connected sockets and read data from all of
> them without blocking.  I don't need multithreading.

What are your needs? haxevideo could a good solution ;-)

--
haXe - an open source web programming language
http://haxe.org