Good socket-programming habits
This is not-a-problem-related question ... just want to ask about your opinion.
Is it a good way to open socket with socket_open in plugin_init, use it and close it with socket_close in plugin_end? Or should I rather open / close new socket every e.g. looped function run? Don't know if there is any difference at all but the fact is, my plugin stopped working as I moved all socket operations to one global socket. Thank you |
Re: Good socket-programming habits
Not many people have experience with sockets (me included), the only person I know have that seems to know what he's doing is DarkSnow. Look in the code snipperts/tutorials section for more info.
|
Re: Good socket-programming habits
I've read Darksnow's tutorial about sockets while ago, read almost all his posts about sockets ... but didn't find it. I'm sure he know's the answer.
Well, anyway, for those who has problems with something like "/core is not a core dump bla", crashing their servers and are using sockets, try not to keep one socket opened at all times, use socket_open / socket_close periodically. Don't know why it was doing it, but it was definitely because of sockets. |
| All times are GMT -4. The time now is 06:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.