nel-all
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nel] pgserver + cli_c in a single process


From: Loic Dachary
Subject: [Nel] pgserver + cli_c in a single process
Date: Fri, 19 Apr 2002 03:57:40 +0200

        Hi,

        Just wanted to let you know that I submitted the patch
described below a few minutes ago (unsure if you actually receive mail
when such an event occurs ;-).

        My agenda is to include picogui in a 3d game library (Free
Software, http://www.nevrax.org/, debian packages at
http://people.debian.org/~loic/debian). If the patch suits your taste
I'll keep working with it. First thing I'll do is to adapt the
existing OpenGL driver and generalize the ttf loading.

        Take care,

----    
https://sourceforge.net/tracker/index.php?func=detail&aid=545912&group_id=4764&atid=304764

----
Here is a set of patches against apps/cli_c/pgserver
that turn clients into self contained applications
including a pgserver. Although it still is at an early
stage, it actually works (tested with dialogdemo) and
is inactive if the configure (make menuconfig) option
is not enabled. Here are the corresponding ChangeLog
entries:

pgserver:

* Makefile.am (pgserver_LDADD): bundle all static libraries
into a single shared library (libpgserver). All static
libraries should be converted to .la for proper libtool
management.

* configure.in: use libtool

* config.in: add CONFIG_MONOPROCESS

* pgmain.c: move actual code into gcore/gmain.c. display a
self explanatory message if pgserver is run but was
compiled
with CONFIG_MONOPROCESS activated. An alternative would be
*not* to install pgserver at all but it may be even more
confusing.

* gcore/gmain.c: split the main function into 3 part (init,
loop, shutdown) so that an application can call init and
shutdown alone and deal with the loop phase in a custom
way.

* include/pgserver/gmain.h: gmain.c declarations

* profile.defaults: add CONFIG_MONOPROCESS

* include/picogui/Makefile.am: add monoprocess.h

* include/picogui/monoprocess.h: declarations of functions
faking the send/recv calls for monoprocess environment,
defined in cli_c.

* net/dispatch.c: when CONFIG_MONOPROCESS, disable rqh_wait

* net/eventq.c: always wrap send in send_response,
when CONFIG_MONOPROCESS, do not check event mask on
client file descriptor.

* net/request.c: always wrap recv in recv_request, when
CONFIG_MONOPROCESS, do not define file descriptor s
and disable
code that deal with it, recv_request branches to
fakenet_recv,
send_response branches to fakenet_send, define
fakenet_iteration
that flushes the client event queue, in net_iteration
replace
server socket probe with fakenet_iteration.

* */Makefile.am: turn all target to LTLIBRARIES so that
building
libpgserver from them can be done by libtool in a
portable way

cli_c:

* configure.in: --enable-monoprocess add
-DCONFIG_MONOPROCESS

* src/Makefile.am: add monoprocess.c

* src/monoprocess.c: Defines functions supporting
pgserver and
client program running within the same process.
Definitions are
provided by the pgserver header monoprocess.h library.

* src/netcore.c: when CONFIG_MONOPROCESS, declares functions
defined by the pgserver library, comment out all code
and definitions dealing with _pgsockfd, replace send by
fakenet_send and recv by fakenet_recv, comment out
recvtimeout,
insert a call to fakenet_iteration in getresponse to
prevent
over stacking requests (synchronous), disable code dealing
with network timeouts, insert server launch in pgInit via
pgMain_init, conclude event loop with pgMain_shutdown,
insert call to net_iteration in pgDispatchEvent

apps:
* configure.in: --enable-monoprocess add -lpgserver

-- 
Loic   Dachary         http://www.dachary.org/  address@hidden
12 bd  Magenta         http://www.senga.org/      address@hidden
75010    Paris         T: 33 1 42 45 07 97          address@hidden
        GPG Public Key: http://www.dachary.org/loic/gpg.txt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]