Jump to content
Sign in to follow this  
lionfaggot

how do i check if a socket died

Recommended Posts

lionfaggot

made an irc bot and i wanted to have it check in the main loop if the socket died, i know ping pong works but suppose the bot just excess floods or something

how do i know if the socket just suddenly disappears? i tried using @error but that didnt do anything lol

Share this post


Link to post
Share on other sites
jvanegmond

After a TCPRecv check @error. If the connection is dropped from the other side, @error will be set non-zero. This is well documented, so your best bet for good examples is the help file.

Share this post


Link to post
Share on other sites
lionfaggot

thanks, shouldve known,, seemed obvious. it seems like its always something stupidly simple :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.