Hello, first you have to check if your perl is thread safe. perl -V | grep THREAD will show. And based on that info you can have 2 choices:
1) perl threads present In this case you should use special subroutine called CLONE and initialize socket here. This sub is called when rlm_perl is loaded from freeradius and new threads are created regarding the settings in your perl section. So in-fact doing it in this way you will have socket per thread. 2) perl without threads In this case you should put your socket initialization code inside the main body of your script. Best Regards, Boian Jordanov SNE Orbitel - Next Generation Telecom tel. +359 2 4004 723 tel. +359 2 4004 002 On Jul 24, 2007, at 10:17 AM, FreeRadius-ML wrote: > Hi All, > > I've been tinkering with rlm_perl for a few days now, and found > it to be fairly simple > and straight forward. However, there is something that I'm a little > unsure about it's possibility, > so I would like to address the list about it. > > My aim is to have my rlm_perl script connect to a platform of > mine, via a proprietary > socket protocol. I've noticed that the rlm_perl example is just > made of functions, without > a main program. My question is this, if I include a main program > loop, will that be executed > upon the loading of the rlm_perl module, and the execution of the > functions by FreeRadius will > be performed in accordance to the main program loop? For example, I > will open a socket in the > main loop, make sure it stays open, and the various functions will > utilize the socket that > was opened in the main loop - is that possible, or am I > misunderstanding something here? > > Regards, > Z2L > - > List info/subscribe/unsubscribe? See http://www.freeradius.org/list/ > users.html - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

