Topic: server-client script

I am referring to this website . What I'm trying to do is to have a server script which will receive data from GPS in one line and store it in some file. Now from what I can see in this server file, server is sending the data to client but I don't need that .. I need only server script to receive data and pass it to some txt file or whatever, but also need to keep that file alive if multiple lines get sent to server. Any hints ? Opinions, I'm willing to consider any opinion, I've made this work on windows with visual basic but I really want to setup linux or bsd server to handle this kind of operation.

Thank you,
C

Re: server-client script

So the GPS is sending the data to the server? In which case it's the server.
How does it know to send the data to the server? Or am I missing something?

Can't you translate the VB to somethin that will run on bsd?

"An educator never says what he himself thinks, but only that which he thinks it is good for those whom he is educating to hear."
-Nietzsche

Re: server-client script

OK, based upon what you've said I have to make some assumptions:

1) The GPS can send UDP packets over a network
2) The server will merely read UDP data

In this case (and I've never done UDP, only TCP) the UDP server listens for requests and when it gets one it merely writes the data to a file and closes the connection and continues waiting for the next bit of data. The example code that Beej provides:

http://beej.us/guide/bgnet/examples/listener.c

listens on port 4950 and upon receiving a UDP packet, prints its details and contents and exits. You'll need to alter the script to loop while waiting for connections and continue the loop after resolving any connections it receives. That sample C code does not write anything back to the client.

"UBER" means I don't drink the coffee... I chew the beans instead
             -- Copyright BSDnexus