Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

void PTelnetSocket::SetWindowSize ( WORD  width,
WORD  height 
)

Parameters:
width  New window width.
height  New window height.

Definition at line 519 of file telnet.cxx.

References IsOurOption(), SendSubOption(), SendWill(), SetOurOption(), and WindowSize.

Referenced by OnDo().

{
  windowWidth = width;
  windowHeight = height;
  if (IsOurOption(WindowSize)) {
    BYTE buffer[4];
    buffer[0] = (BYTE)(width >> 8);
    buffer[1] = (BYTE)width;
    buffer[2] = (BYTE)(height >> 8);
    buffer[3] = (BYTE)height;
    SendSubOption(WindowSize, buffer, 4);
  }
  else {
    SetOurOption(WindowSize);
    SendWill(WindowSize);
  }
}


Generated by  Doxygen 1.6.0   Back to index