Jul 2, 2008, 3:47 AM
Post #1 of 3
Storing Perl Socket Object to MySQL Table
I am working on a perl script which uses IO::Select and IO::Socket modules.
When a client connect to perl program, perl program need to send message to some other clients who are already connected. So far I am using a method by creating an array of such client's socket handle (fileno). Then using a loop for all connected clients while checking if perl program has to send message to that socket handle or not.
Now what I am thinking that if I can place whole socket object for each connected client into a mysql table and then use that table to get target client's socket handle, I can speed up things as well free some memory.
However, I am not sure how I can have whole socket object into mysql table. I use DBI to access mysql table.