Thread: Rom... BOOT?
View Single Post
Old 01-06-2009, 08:31 PM   #4
Lasher
Administrator
 
Lasher's Avatar
 
Join Date: May 2005
Name: Derek
Location: Orlando
Posts: 357
Lasher has a spectacular aura aboutLasher has a spectacular aura about
Re: Rom... BOOT?

IIRC in write_to_descriptor() ROM checks for an error after the call to write() and if it receives an error returns a value that ultimately causes the socket to close.

The code is not checking for the special error case of EAGAIN which basically means "You tried to perform an action on a non-blocking socket that would have blocked", or the short version, "Not yet!".

You'd need to check for this error and, combined with how much output actually DID get sent, adjust the buffers accordingly then try again on the next pulse of the MUD. After a certain amount of pulses you'd probably want to just give up.

If you have the ability to run a copy of your mud on a local server with no network latency, chances are you don't see the error at all because you are able to receive the data as quickly as the MUD is able to send it.
Lasher is offline   Reply With Quote