Client-server script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Client-server script
# 1  
Old 03-18-2009
Client-server script

Hi all,

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
# 2  
Old 03-18-2009
Did you read that website? The server described there is written in C, not a shell script, since shells usually can't do socket operations (bash can do them, but that's more of an exception than anything AFAIK)
How exactly will the data be transfered from the GPS device to the computer? Is the connection initiated by the device or the computer? Is any conversion of the data necessary? Is the connection IP based (Ethernet/WiFi/Firewire) or something like USB or RS232?
# 3  
Old 03-18-2009
pludi:

The GPS device establishes a connection to my server by connecting to its IP and PORT and then send data in one line. I do not need to decode the data, all I need is to save it in a file.
# 4  
Old 03-18-2009
Scroll down in Beej's guide, to the simple stream client & take a look at how it receives from the server. Basically, all you need to do is change the servers send() to the appropriate recv() call & write the line to an open file descriptor.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sftp script for dev server to client server

hi, i am new to unix, cuold u send some sftp acripts to send files to dev server to clint server, (1 Reply)
Discussion started by: Koti.annam
1 Replies

2. Shell Programming and Scripting

*ix script to check port of client server and return output

Hello EveryOne, I am new to *ix. some could help to write a script. Problem :- Have to ssh to so many client and check port or filesystem usage, so thinking to automate using script. What i Need:- when i run script on my Launchpad server, it should Should ask and SSH to user provided... (3 Replies)
Discussion started by: MeFirst
3 Replies

3. UNIX for Dummies Questions & Answers

Client server C

Hello, Please, is there on unix.com the source code of a client C and server C: as shown in following figure: File:InternetSocketBasicDiagram zhtw.png - Wikipedia, the free encyclopedia Thank you so much for help (1 Reply)
Discussion started by: chercheur857
1 Replies

4. Programming

Client Server C

Hello, Please I would create a client and a server in C that communicate frequently. The client sends "hello message" to the server, the server waits a few minutes and sends a "hello message" to the client, the client sends again "hello server ".. etc up to 15 minutes Can you guide me... (3 Replies)
Discussion started by: chercheur857
3 Replies

5. Windows & DOS: Issues & Discussions

Office server => laptop =>client server ...a lengthy and laborious ftp procedure

Hi All, I need your expertise in finding a way to solve my problem.Please excuse if this is not the right forum to ask this question and guide me to the correct forum,if possible. I am a DBA and on a daily basis i have to ftp huge dump files from my company server to my laptop and then... (3 Replies)
Discussion started by: kunwar
3 Replies

6. Shell Programming and Scripting

How to pass data from server (CGI script) to client (html page)

Hi I know how to pass data from client side (html file) to server using CGI script (POST method). I also know how to re-create the html page from server side after receiving the data (using printf). However I want to write static pages on client side (only the structure), and only to pass... (0 Replies)
Discussion started by: naamabm
0 Replies

7. Programming

Client/Server Socket Application - Preventing Client from quitting on server crash

Problem - Linux Client/Server Socket Application: Preventing Client from quitting on server crash Hi, I am writing a Linux socket Server and Client using TCP protocol on Ubuntu 9.04 x64. I am having problem trying to implement a scenario where the client should keep running even when the... (2 Replies)
Discussion started by: varun.nagpaal
2 Replies

8. Shell Programming and Scripting

Client-server

Hi, I have installed the vmware server on my debian os and has several clients connected to it. Is there any script that enable the server to restart the client automatically?? Can anyone help. Thanks in advance (3 Replies)
Discussion started by: kanexxx
3 Replies

9. Shell Programming and Scripting

copy file from server to client script

i want to run automated backup copy , using crontab and how to do that? the backup file should be taken from the sun server and put it in the client machine daily.pls help.. (5 Replies)
Discussion started by: gini
5 Replies

10. UNIX for Dummies Questions & Answers

client/server

Hi, yes i belong to that duummies group of people so here is the question that i need someone to explain it to me and posiblly to answere it to me in a plain english. This is the question: Describe the concept of “client-server” software. Discuss what each side of the equation... (2 Replies)
Discussion started by: bole
2 Replies
Login or Register to Ask a Question