Raised This Month: $ Target: $400
 0% 

Good socket-programming habits


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 05-08-2007 , 16:27   Good socket-programming habits
Reply With Quote #1

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
alien is offline
Send a message via ICQ to alien
Zenith77
Veteran Member
Join Date: Aug 2005
Old 05-08-2007 , 17:06   Re: Good socket-programming habits
Reply With Quote #2

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.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 05-08-2007 , 18:09   Re: Good socket-programming habits
Reply With Quote #3

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.
alien is offline
Send a message via ICQ to alien
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode