[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
what is the difference between srvfunc.c and client.c?
From: "=?gb2312?B?emhhbmd5YW5zZWFza3k=?=" ####@####.#### Date: 31 May 2005 04:46:26 +0100 Message-Id: <429BDDB6.00009F.18564@m0205.mail.163.com> Hi, I am a newer to nanogui.There's a question confused me a lot.I found many functions that have the same name are defined in srvfunc.c and client.c,such as GrOpen(),GrNewGC(),GrSetGCForeground(),and so on.But what is the difference between the same-name functions in the two programs?If I use GrNewGC() in my program,which function is called? Thank you vary much!! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] what is the difference between srvfunc.c and client.c?
From: Alain Volmat ####@####.#### Date: 31 May 2005 04:58:59 +0100 Message-Id: <20050531035851.GA7989@pop.mail.yahoo.com> Hi, I'm not the person who knows nanoX internals the best but I think I can reply to this one. The answer to your question is located in the Makefile (src/nanox/Makefile). You will see that depening on LINK_APP_INTO_SERVER (defined in config file) either srvfunc.c or client.c will get compiled. If you set LINK_APP_INTO_SERVER=y, then srvfunc.c will be used, otherwise client.c will be used. Regards, Alain * zhangyanseasky [Tue, 31 May 2005 at 11:44 +0800] <quote> > Hi, > I am a newer to nanogui.There's a question confused me a lot.I found many functions that have the same name are defined in srvfunc.c and client.c,such as GrOpen(),GrNewGC(),GrSetGCForeground(),and so on.But what is the difference between the same-name functions in the two programs?If I use GrNewGC() in my program,which function is called? > > Thank you vary much!!</quote> _____________________________________________________________________________ Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] what is the difference between srvfunc.c and client.c?
From: Udaya Bhaskar ####@####.#### Date: 31 May 2005 07:19:55 +0100 Message-Id: <f6332249050530231947f6245c@mail.gmail.com> Dear zhangyanseasky, Practically I did not worked on it, but I can say that all those are common APIs for the network communication. Broadly the steps to communicate between a client and server can be classified into the following: ******************** Client ******************** 1. Open the Socket 2. Bind.. 3. Connect to the port. 4. Listen. 5. Send or Receive. ******************* Server ******************* 1. Open the Socket or Create the Socket 2. Bind. 3. Connect to the port. 4. Send or Receive. While doing the Socket Programming in Linux also, we use some common APIs in both server and client. Regards. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] what is the difference between srvfunc.c and client.c?
From: Alex Holden ####@####.#### Date: 31 May 2005 11:22:57 +0100 Message-Id: <F5CD60E9-D7B2-4A01-A50D-0B6697AFD2E3@linuxhacker.org> On 31 May 2005, at 04:58, Alain Volmat wrote: > You will see that depening on LINK_APP_INTO_SERVER (defined in > config file) > either srvfunc.c or client.c will get compiled. > If you set LINK_APP_INTO_SERVER=y, then srvfunc.c will be used, > otherwise > client.c will be used. client.c/srvnet.c form an RPC system. When LINK_APP_INTO_SERVER=n the functions in client.c are called by the client, but all they do is to pack up the function arguments and transmit a message to the server which causes the corresponding wrapper function in srvnet.c to be called which in turn unpacks the arguments and calls the srvfunc.c function as if the client was running inside the server. IIRC it was actually possible to have multiple clients running both inside the server and outside the server at the same time with microwin-aph (look at the NANOWM_LINKED_IN and INTERNAL_NXEYES_DEMO stuff for an example of running multiple clients inside the server). -- ------------ Alex Holden - http://www.alexholden.net/ ------------ If it doesn't work, you're not hitting it with a big enough hammer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] what is the difference between srvfunc.c and client.c?
From: "Greg Haerr" ####@####.#### Date: 7 Jun 2005 05:10:24 +0100 Message-Id: <219201c56b16$b9712620$6401a8c0@winXP> : IIRC it was : actually possible to have multiple clients running both inside the : server and outside the server at the same time with microwin-aph Alex - do you recall how this was actually done? Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] what is the difference between srvfunc.c and client.c?
From: Alex Holden ####@####.#### Date: 7 Jun 2005 10:30:28 +0100 Message-Id: <89530E70-2A53-42CA-B784-F6FA0F5A6A5E@linuxhacker.org> On 7 Jun 2005, at 05:09, Greg Haerr wrote: > : IIRC it was > : actually possible to have multiple clients running both inside the > : server and outside the server at the same time with microwin-aph > Alex - do you recall how this was actually done? It doesn't use multi-threading; instead it relies on the "clientlets" being completely event driven and not blocking the CPU for long periods of time (co-operative multitasking, in other words). Each clientlet needed to have a call to their initialisation routine added to GsInitialize(), and in their initialisation they needed to call GrRegisterInternClient() to add their event handler function to a callback list and register for at least one event (otherwise it'll never get called). The event dispatcher then calls the clientlet's event handler function whenever it has an event to deliver to it. Background tasks within clientlets could be accomplished by requesting periodic timer events. The code is all in microwin-aph. If you set NANOWM_LINKED_IN in the config file, the window manager runs inside the server. If you set INTERNAL_NXEYES_DEMO, then several instances of nxeyes are created inside the server (I can't remember if nxeyes made it to microwin- greg- it was itself a nice demonstration of the shaped window support I added). Both can be used at once, and ordinary network clients (both the named socket type and the TCP/IP type) can all connect to the server at the same time. There's lots of other cool features in microwin-aph that were never folded back into microwin-greg- take a look at the ChangeLog file in microwin-aph for a list. My favourite was probably the full alpha channel support and the NanoBreaker game (which was written to demonstrate the alpha channel stuff). -- ------------ Alex Holden - http://www.alexholden.net/ ------------ If it doesn't work, you're not hitting it with a big enough hammer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |