Re: How to implement an asynchronous processor without RPC
Gerd Stolpmann <[email protected]> Mon, 23 Sep 2013 13:07:24 +0200
| Newsgroups | gmane.comp.lang.ocaml.lib.net.devel |
|---|---|
| Message-ID | <1379934444.3407.16.camel@zotac> |
--===============1133030979737066056== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-UjYWCqokcun/ycsvsPWy" --=-UjYWCqokcun/ycsvsPWy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Am Freitag, den 20.09.2013, 16:08 +0200 schrieb Davide Ramaglietta: > Hi, >=20 > is there exist any possible way to implement a server using only Netplex = (avoiding the RPC layer implication), > which provides a asynchronous processor such that can handles several con= nection in parallel?=20 Yes, of course. There is no example in the distribution, but look at examples/netplex/hello_world.ml: The method [process] gets a file descriptor fd, and it can do anything with it. fd is by default in non-blocking mode. When you are done with fd, call [when_done]. You'll have to use the event_system of the Netplex container for asynchronous processing, i.e. container#event_system, where container =3D Netplex_cenv.self_cont() if you don't have it at hand otherwise. Gerd > Best regards, > --Davide. > -------------------------------------------------------------------------= ----- > LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! > 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePo= int > 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack inc= ludes > Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.=20 > http://pubads.g.doubleclick.net/gampad/clk?id=3D58041151&iu=3D/4140/ostg.= clktrk > _______________________________________________ > Ocamlnet-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel >=20 --=20 ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany [email protected] My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------ --=-UjYWCqokcun/ycsvsPWy Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAABAgAGBQJSQCDsAAoJEAaM4b9ZLB5TtywH/21usdqCSFXwSMbNmjDT8vl+ 9gh9NkwVE0OvcKc6xSwyvcelSVYpklbG6y4nZ5jS5dSiQ0WpNGf2qr4AthvOI/8v pqd3P/bI4tT7o9rfyR3vPbXdWSjXixbb6oWzWMq9EqD8c+iCrCEuRaKod1Bl3XYT qxrd1BdIz5RBYfH/S7sLjefid4+t4KGjkBEPR9nVN9FvkATy6aIJUykoXQmThdLK z/gYwbEkP1Ruqyd0D52Ya7hlzeMF+WxuQeeSJGK4/OZgoOzZOzf2z3JlhKfzTxYg JqTVtpz0v79PgzI8D7mVfQ8ibj6eTuVPx/md8NGynA6kgNK2NNJ4ZBDKNNCyky8= =iv3C -----END PGP SIGNATURE----- --=-UjYWCqokcun/ycsvsPWy-- --===============1133030979737066056== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk --===============1133030979737066056== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ocamlnet-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel --===============1133030979737066056==--