DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 18th March 2009
c0mrade's Avatar
c0mrade c0mrade is offline
Port Guard
 
Join Date: May 2008
Posts: 41
Default Server-Client

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
Reply With Quote
  #2   (View Single Post)  
Old 18th March 2009
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Real Name: Ben
Spam Refugee
 
Join Date: Jul 2008
Location: Rotterdam, The Netherlands
Posts: 336
Default

You could try net/netcat from ports (the executable is called nc). Here's an online man file for it.

Code:
Netcat is a simple Unix utility which reads and writes data across
network connections using TCP or UDP protocol.  It is designed to be a
reliable "back-end" tool that can be used directly or easily driven by
other programs and scripts.  At the same time it is a feature-rich
network debugging and exploration tool, since it can create almost any
kind of connection you would need and has several interesting built-in
capabilities.
Here's a simple tcp example:

Host 1:
Code:
# nc -k -l 12345
Host 2:
Code:
telnet host1 12345
Trying host1...
Connected to host1.
Escape character is '^]'.
hello
Host 1:
Code:
# nc -k -l 12345
hello

Last edited by DutchDaemon; 18th March 2009 at 10:38 AM.
Reply With Quote
  #3   (View Single Post)  
Old 18th March 2009
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Real Name: Ben
Spam Refugee
 
Join Date: Jul 2008
Location: Rotterdam, The Netherlands
Posts: 336
Default

Alternatively, if the sending host has the ability to use logger, you can send messages using logger, and have syslogd on the receiving end log those messages to a file. Just choose one of the available localn log facuilities.
Reply With Quote
  #4   (View Single Post)  
Old 18th March 2009
c0mrade's Avatar
c0mrade c0mrade is offline
Port Guard
 
Join Date: May 2008
Posts: 41
Default

Thank you I have solved that part of a problem
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ipsec with client nat sicute OpenBSD General 0 30th October 2008 05:39 PM
IM Client schrodinger OpenBSD Packages and Ports 6 16th September 2008 02:09 PM
rsync freebsd server/windows client Weaseal FreeBSD General 0 27th August 2008 12:29 AM
DDNS Client revzalot OpenBSD Installation and Upgrading 3 12th August 2008 02:21 AM
Client torrent ! gnowar OpenBSD General 10 3rd June 2008 10:50 AM


All times are GMT. The time now is 10:49 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick