Definition at line 137 of file ttelhndl.cpp.
Referenced by TTelnetHandler::ParseIAC().
{
int l = 0;
unsigned char *buf = (unsigned char *)b;
union {
char szResponse[2];
int n;
};
buf[l++] = IAC;
buf[l++] = SB;
buf[l++] = TELOPT_NAWS;
n = width;
buf[l] = szResponse[1];
if(buf[l-1] == IAC) buf[l++] = IAC;
buf[l++] = szResponse[0];
if(buf[l-1] == IAC) buf[l++] = IAC;
n = height;
buf[l++] = szResponse[1];
if(buf[l-1] == IAC) buf[l++] = IAC;
buf[l++] = szResponse[0];
if(buf[l-1] == IAC) buf[l++] = IAC;
buf[l++] = IAC;
buf[l++] = SE;
return l;
}