linux, sockets, c
- From: lsg <lsg25@xxxxxxxxx>
- Date: Sat, 28 Jan 2006 14:08:05 +0100
Hi,
I'm new to linix programming and I need some help. I'm writing a program
to collect data from remote devices using sockets.
My program:
-connects to remote device (sockets,TCP)
(5x){
-sends some data,
-receives some bytes
}
-decode data
-write to mysql database
-close connection
It takes ~20s. There are n devices (~50). I need to do every 5 min.
The ideal solutions is to read all devices at the same time. How to
impement that? Fork() ? Threads ? Select() or write one client and with
crontab run program ip1, program ip2.... ? Any suggestions, pointers,
help or links would be very helpful. Maybe it could be done like port
scanner?
Thanks a lot
Leo
.
- Follow-Ups:
- Re: linux, sockets, c
- From: Rick Ingham
- Re: linux, sockets, c
- From: Grant Edwards
- Re: linux, sockets, c
- Prev by Date: Re: Cross-platform, the freedom to choose any computer
- Next by Date: Re: running at boot time & signals
- Previous by thread: Re: Cross-platform, the freedom to choose any computer
- Next by thread: Re: linux, sockets, c
- Index(es):