0
我正在嘗試開發一個應用程序,如IBM iSeries AS/400的終端仿真。我正在使用AsyncSocket連接到服務器。連接是好的,但我應該如何登錄連接建立後使用用戶名和密碼的Telnet服務器。有什麼格式或命令或方式,我應該將用戶名和密碼發送到服務器登錄。如何使用Telnet登錄IBM iSeries AS/400
我正在嘗試開發一個應用程序,如IBM iSeries AS/400的終端仿真。我正在使用AsyncSocket連接到服務器。連接是好的,但我應該如何登錄連接建立後使用用戶名和密碼的Telnet服務器。有什麼格式或命令或方式,我應該將用戶名和密碼發送到服務器登錄。如何使用Telnet登錄IBM iSeries AS/400
聽起來你很想仔細研究RFC 4777 - RFC 4777 - IBM's iSeries Telnet Enhancements。
注特別是對「標準進行Telnet選項協商」一節:
Telnet server option negotiation [RFC855] typically begins with the
issuance, by the server, of an invitation to engage in terminal type
negotiation with the Telnet client (DO TERMINAL-TYPE) [RFC1091]. The
client and server then enter into a series of sub-negotiations to
determine the level of terminal support that will be used. After the
terminal type is agreed upon, the client and server will normally
negotiate a required set of additional options (EOR [RFC885], BINARY
[RFC856], SGA [RFC858]) that are required to support "transparent
mode" or full screen 5250/3270 block mode support. As soon as the
required options have been negotiated, the server will suspend
further negotiations and begin with initializing the actual virtual
device on the iSeries. A typical exchange might start as follows:
iSeries Telnet server Enhanced Telnet client
-------------------------- -------------------------
IAC DO TERMINAL-TYPE -->
<-- IAC WILL TERMINAL-TYPE
IAC SB TERMINAL-TYPE SEND
IAC SE -->
IAC SB TERMINAL-TYPE IS
<-- IBM-5555-C01 IAC SE
IAC DO EOR -->
<-- IAC WILL EOR
<-- IAC DO EOR
IAC WILL EOR -->
Actual bytes transmitted in the above example are shown in hex below.
iSeries Telnet server Enhanced Telnet client
-------------------------- -------------------------
FF FD 18 -->
<-- FF FB 18
FF FA 18 01 FF F0 -->
FF FA 18 00 49 42 4D 2D
35 35 35 35 2D 43 30 31
<-- FF F0
FF FD 19 -->
<-- FF FB 19
<-- FF FD 19
FF FB 19 -->
所以你真的想尋找那些字節碼併發送相應的響應。