in reply to Writing a perl based 'Homework' Server.
If you want to enable the access of multi users in the same time to the server, take a look in this node: Re: spawning Perl scripts (Win32/Linux sample) (to run concorrent codes without threads). The use of fork is only recomended on Linux, on Win32 use threads (Perl-5.8.0).
But note that you need to know if who is connected to the server are sending right the data, or only opening the door, to avoid a basic DOS attack. To do that you can use IO::Select, but will read byte by byte!
Other thing is to limit the access to the srv for only some IPs:
my $server = IO::Socket::INET->new( Listen => 5, LocalAddr => '192.168.0.0', LocalPort => 5050, Proto => 'tcp' ) ;
About the users id and pass, you can (should) use a database. Just take a look in DBI. For a very simple database, with flat files, use DBD::CSV, or DBD::SQLite. The both don't need a main server, the module work as the srv.
And CPAN is your friend: http://search.cpan.org
Graciliano M. P.
"The creativity is the expression of the liberty".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Writing a perl based 'Homework' Server.
by DigitalKitty (Parson) on Apr 18, 2003 at 09:04 UTC | |
by gmpassos (Priest) on Apr 19, 2003 at 17:03 UTC | |
by TVSET (Chaplain) on Apr 21, 2003 at 04:16 UTC |