TutFileTraverse traverse open files
trav_func
function to be called for each open file
trav_arg
traversal argument to pass to trav_func
Last value returned by trav_func
.
If TutFileTraverse fails, it returns NULL
without calling trav_func
, and the global SmartSockets error number is set to:
TutFileTraverse traverses all the files that have been opened and calls trav_func
once for each of these files. The traversal continues until all the open files have been traversed, or until trav_func
returns a non-null value. The last value returned by trav_func
is returned to the caller.
None
TutSetFileOpenFunc, TutSetFileCloseFunc, TutSetFileReadFunc
This example traverses all open files and prints out the name and mode for the file:
T_ENTRY trav_func(file, arg) T_FILE file; T_PTR arg; { TutOut("File name: %s, mode %s\n", file->fname, file->mode); return NULL; } TutFileTraverse(trav_func, NULL);
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |