|
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.
|
|
void * | GetExtraData (int fd) |
| Returns the extra structure value from IoExpandStruct associated with the file descriptor.
|
|
void | FreeExtraFd (int fd) |
| Free a file descriptor and associated resources.
|
|
int | GetFreeExtraFDCount () |
| Returns the number of free file descriptors.
|
|
int | GetFreeSocketCount (void) |
| Returns the number of free sockets.
|
|
#include< iointernal.h >
The NetBurner environment integrates the RTOS, TCP/IP stack, and other peripherals with a file I/O system based on file descriptors. A file descriptor can be described as a handle to a network socket, serial port, system peripheral, or any other object that can be read or written to. Most of the API functions pass a file descriptor as a parameter to such an object. These function are available if you wish to use the file descritpor system capabilities for your own application purposes. Please refer to the File Descriptor section in the Programmers Guide.
◆ FreeExtraFd()
void FreeExtraFd |
( |
int | fd | ) |
|
#include <iointernal.h>
Free a file descriptor and associated resources.
- Parameters
-
◆ GetExtraData()
void * GetExtraData |
( |
int | fd | ) |
|
#include <iointernal.h>
Returns the extra
structure value from IoExpandStruct
associated with the file descriptor.
- Parameters
-
- Return values
-
Value | of the extra member of the structure |
◆ GetExtraFD()
int GetExtraFD |
( |
void * | extra_data, |
|
|
struct IoExpandStruct * | pFuncs ) |
#include <iointernal.h>
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_data | The optional extra_data void pointer can be used to pass data into the file descriptor |
*pFuncs | Structure containing callback functions for such things as read, write, close, and the extra_data variable |
- Return values
-
Value | greater than 0, representing the file descriptor on success |
-1 | on failure |
◆ GetFreeExtraFDCount()
int GetFreeExtraFDCount |
( |
| ) |
|
#include <iointernal.h>
Returns the number of free file descriptors.
- Return values
-
Number | of free extra file descriptors |
◆ GetFreeSocketCount()
int GetFreeSocketCount |
( |
void | | ) |
|
#include <iointernal.h>
Returns the number of free sockets.
- Return values
-