[GRASS5] sockets question

strobe anarkhos anarkhos at mac.com
Wed Mar 14 06:55:30 EST 2001


I'm moving forward on my plan to improve GRASS 2D display (adding layers, alpha channel, resolution independent graphics, rulers, WYSIWYG printing, etc.) . I have a small question about sockets.

I'm using GRASS 5 as my base and thus am using fifos in a fully compatible fashion to other grass5 display drivers. To my knowledge the developmental version 5.1 is using sockets instead of fifos to connect the display commands to the servers.

Are clients pushing the same data to the servers in 5.1?

How do the clients/servers know which sockets to use? With fifos they are included in the arguments, however with sockets I would think the display driver takes the initiative to register sockets which the clients look for, however that's pure speculation on my part.

My code uses functions in connect.c and SWITCHER.c in GRASS 5.0 to check the validity of fifos and to then 'connect' to them (read/write to them). The functions are used/copied verbatim, I don't change the initial dispatch method (which is currently calling a bunch if inline drawing functions). If your sockets implementation is similar to the fifo implementation I should be able to support both methods easily.

I hope nobody is adding functions to the display driver function set in 5.1. As soon as I support the current set I'll post the functions I plan to add for layers etc. Hopefully no parallel work is going on.

(FYI what I actually do is use two executables. One acts as the display driver and tells the primary application which fifos to use to create a new display canvas document. The display driver initializer knows the primary app is running because it vends an object as a server. I have to do this because fifos are passed as command arguments instead of some runtime method which you may or may not be using with sockets. Either way I can allow the primary application to create or accept sockets or use the prior method if it's more like fifos and command line arguments. I hope that made sense.)

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list