NetBurner 3.1
IOInternal - File Descriptors

Functions

int GetExtraFD (void *extra_data, struct IoExpandStruct *pFuncs)
 Returns a file descriptor for the structure passed as the IoExpandStruct. FreeExtraFd( ) will release the fd back to the pool of available fds. More...
 
void * GetExtraData (int fd)
 Returns the extra structure value from IoExpandStruct associated with the file descriptor. More...
 
void FreeExtraFd (int fd)
 Free a file descriptor and associated resources. More...
 
int GetFreeExtraFDCount ()
 Returns the number of free file descriptors. More...
 

Detailed Description

The NetBurner I/O Internals Group

Function Documentation

◆ FreeExtraFd()

void FreeExtraFd ( int  fd)

Free a file descriptor and associated resources.

Parameters
fdFile descriptor

◆ GetExtraData()

void* GetExtraData ( int  fd)

Returns the extra structure value from IoExpandStruct associated with the file descriptor.

Parameters
fdFile descriptor
Return values
Valueof the extra member of the structure

◆ GetExtraFD()

int GetExtraFD ( void *  extra_data,
struct IoExpandStruct *  pFuncs 
)

Returns a file descriptor for the structure passed as the IoExpandStruct. FreeExtraFd( ) will release the fd back to the pool of available fds.

Parameters
extra_dataThe optional extra_data void pointer can be used to pass data into the file descriptor
IoExpandStructStructure containing callback functions for such things as read, write, close, and the extra_data variable
Return values
Valuegreater than 0, representing the file descriptor on success
-1on failure

◆ GetFreeExtraFDCount()

int GetFreeExtraFDCount ( )

Returns the number of free file descriptors.

Return values
Numberof free extra file descriptors