[GRASS5] socket server sample in programman

Hi
I try to access GRASS from a C progamm via sockets.
I found in the GRASS 5.0 Programmer's Manual on S.208 das Trivial Socket Server (socketServer_grass.c) example and to learn the handling I try to customize it to the status that:
a client process (client3.c) sends a message to Trivial Socket Server and the Trivial Socket Server just sends back the message.

I can do this (without GRASS) with normal C-programms (client.c and server3.c), but with the Trivial Socket Server example I'm stuck:

- what exactly is the argument to give to the Trivial Socket Server example
(in the description: takes a simple name for a communication channel and builds the full path for a socket file with that name)
- how is the host:port specified? for example in client.c it is done explicitely:
(line 35 ff addr.sin_port = 9836; addr.sin_addr.s_addr = inet_addr("127.0.0.1");

thanx a lot Dani

(attachments)

client3.c (1.73 KB)
server3.c (2.28 KB)
socketServer_grass.c (1.74 KB)