tfTeldIncoming
Table of Contents >> Application Reference >> Telnet Daemon
| #include <trsocket.h> |
| int tfTeldIncoming | ( |
| ttUserTeldHandle teldHandle, | |
| char * teldRecvBufPtr, | |
| int teldBytes, | |
| int eolFlag | |
| ); |
Function Description
The user provides this function. It is called from the TELNET server to pass incoming data from the specified TELNET client to the user. If 'eolFlag' is non-zero, then the sequence <CR, LF> or <CR, NUL> has been received in ASCII mode, or <IAC, EOR> in binary mode. The user should copy all the data to their own buffers. If there is not enough room, the user should return TM_EWOULDBLOCK, and the TELNET server will try to call this routine again later.
Parameters
- teldHandle
- Unique identifier for a TELNET connection.
- teldRecvBufPtr
- Pointer to buffer containing received data.
- teldBytes
- Number of bytes in the receive buffer.
- eolFlag
- End of line flag, 1 to indicate EOL, 0 otherwise.
Returns
- TM_ENOERROR
- Success.
- TM_EINVAL
- Invalid 'teldHandle'.
- TM_EWOULDBLOCK
- The user did not have enough room for all of the data. No data has been copied.