CTelnetClient::SetMode Method  
 
UINT SetMode(
  UINT nMode,  
  BOOL bEnable  
);

The SetMode method sets one or more client modes for the specified session.

Parameters

nMode
The client mode. This value is a combination of one or more flags which determines how the client handles local character echo and character processing. The following values are recognized:
Value Description
TELNET_MODE_LOCALECHO The local client is responsible for echoing data entered by the user. By default, this mode is not set which means that the server is responsible for echoing back each character written to it.
TELNET_MODE_BINARY Data exchanged between the client and server should not be converted or line buffered. If this option is not specified, the high-bit will be cleared on all characters, and single linefeed characters will be converted to carriage-return/linefeed sequences.
bEnable
This boolean flag specifies if the specified mode is to be enabled or disabled.

Return Value

If the method succeeds, the return value is the previous mode. If the method fails, the return value is TELNET_ERROR. To get extended error information, call GetLastError.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cstntv12.lib

See Also