Major Update:
- Minor fix: Set correct names in comments at top of file - New FileCore Class: - Writing data to output file - BufferCore: - Check for "EAGAIN" on write and retry write - FunctionCore: - Add new Output method that references LocalIO directly - SelectableCore: - New method SetAutomanage to specify auto re-open parameters - Re-open timer implemented to slow re-open events - Only call ProcessBuffer() if data received on socket - Force processing input data when no input marker set - Use new Output method to simplify code - Bug fix: Read correctly from buffer on multiple reads/writes on FD - Check for "EAGAIN" on write to FD and retry write
This commit is contained in:
@@ -260,8 +260,31 @@ int CFunctionCore::Output( const char * IOName, const char * Data, int Len )
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Return processed bytes
|
||||
return Output( LocalIO, Data, Len );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int CFunctionCore::Output( const TLocalIO * LocalIO, const char * Data, int Len )
|
||||
{
|
||||
TLinkedIO * Output = NULL;
|
||||
|
||||
// Validate
|
||||
if (!LocalIO || !Data) {
|
||||
return 0;
|
||||
} else if (Len == -1) {
|
||||
Len = strlen( Data );
|
||||
}
|
||||
|
||||
// Log event
|
||||
ShowOutput( DebugLevel, dlHigh, OutputDisplay, Data, Len, "%s: Local IO '%s' - OUT:", Name, IOName );
|
||||
ShowOutput( DebugLevel, dlHigh, OutputDisplay, Data, Len, "%s: Local IO '%s' - OUT:", Name, LocalIO->Name );
|
||||
|
||||
// Pass output to all linked inputs
|
||||
Output = LocalIO->FirstOutput;
|
||||
while (Output) {
|
||||
Output->Function->Input( Output->IOName, Data, Len );
|
||||
Output = Output->Next;
|
||||
}
|
||||
|
||||
// Return processed bytes
|
||||
return Len;
|
||||
|
||||
Reference in New Issue
Block a user