16 #ifndef _NB_IOINTERNALS_H 17 #define _NB_IOINTERNALS_H 26 #define IOINTERNALS_FRAMEWORK_TAG ((unsigned int)0x10127EB6) 44 typedef struct _IoFrameworkStruct
48 int extraSocketNumber;
50 } __attribute__((packed)) IoFrameworkStruct;
64 int (*
read)(
int fd,
char *buf,
int nbytes);
65 int (*
write)(
int fd,
const char *buf,
int nbytes);
67 int (*
peek)(
int fd,
char *buf);
71 } __attribute__((packed));
99 int GetExtraFD(
void *extra_data,
struct IoExpandStruct *pFuncs);
139 void SetDataAvail(
int fd);
140 void ClrDataAvail(
int fd);
142 void SetWriteAvail(
int fd);
143 void ClrWriteAvail(
int fd);
145 void SetHaveError(
int fd);
146 void ClrHaveError(
int fd);
int GetFreeExtraFDCount()
Returns the number of free file descriptors.
Definition: extraio.cpp:104
int write(int fd, const char *buf, int nbytes)
This function writes data to the stream associated with a file descriptor (fd).
Definition: fileio.cpp:152
void * GetExtraData(int fd)
Returns the extra structure value from IoExpandStruct associated with the file descriptor.
Definition: extraio.cpp:92
void FreeExtraFd(int fd)
Free a file descriptor and associated resources.
Definition: extraio.cpp:81
int read(int fd, char *buf, int nbytes)
This function reads data from a file descriptor (fd), and will block forever until at least one byte ...
Definition: fileio.cpp:288
int peek(int fd, char *c)
This function peeks at data from a file descriptor (fd), and will block forever until at least one by...
Definition: fileio.cpp:232
int close(int fd)
This function closes the resources associated with a file descriptor (fd). This can be a TCP socket o...
Definition: fileio.cpp:99
int GetExtraFD(void *extra_data, struct IoExpandStruct *pFuncs)
Returns a file descriptor for the structure passed as the IoExpandStruct. FreeExtraFd( ) will release...
Definition: extraio.cpp:58