tfTeldUserStorePointer

Jump to: navigation, search

Table of Contents >> Application Reference >> Telnet Daemon


#include <trsocket.h>


int tfTeldUserStorePointer (
ttUserTeldHandle teldHandle,
void TM_FAR * userPtr
);


Function Description

This function allows the user to assign any pointer value to a Telnet connection. This is a convenient way to create separate state information for each connection that you receive via the tfTeldOpened() or tfNgTeldOpened() callback. The pointer can be retrieved in the tfTeldIncoming() or tfTeldClosed() callbacks by calling tfTeldUserGetPointer().


Parameters

  • teldHandle
    The connection handle received by your callback function tfNgTeldOpened() or tfTeldOpened().
  • userPtr
    Any user-defined pointer value.


Returns

  • TM_ENOERROR
    Success
  • TM_EPERM
    Not initialized; call tfTeldUserInit() first.
  • TM_EINVAL
    Invalid Telnet connection handle.


Table of Contents >> Application Reference >> Telnet Daemon