[阅读: 287] 2009-07-31 08:46:22
procedure TIdTelnet.Handle_SB(CurrentSB: Byte; sbData: String; sbCount: Integer);
var
Resp : String;
begin
if (sbcount > 0) and (sbdata = TNOS_TERMTYPE_SEND) then
begin
// if someone inadvertantly sets Termnal to null
// You can set termial to anything you want i supose but be prepared to handle
// the data emulation yourself
if Terminal = '' then {Do not Localize}
Terminal := 'dumb'; {Do not Localize}
Resp := TNC_IAC + TNC_SB + TNO_TERMTYPE + TNOS_TERM_IS + Terminal + TNC_IAC + TNC_SE;
SendNegotiationResp(Resp);
end;
// add authentication code here
end;
// TNC_IAC + TNC_SB + TNO_TERMTYPE + TNOS_TERM_IS + Terminal + TNC_IAC + TNC_SE;
// 255 250 24 0 dumb 255 240