跳到主要内容

对现行 ICP 的最小改动

我们能想到的、让现行 ICP 的面貌与上述方案相似的最小改动, 是增加一条 NCP 层命令 -- accept:

ACC, L, U, S

此时, NCP 之间用 RFC #165 记法表示的交换如下:

<where the original uses a script lowercase "L" we use "l">
<where the original uses subscripts we use {} so that
A-subscript-B is printed A{B} >
Server NCP                   User NCP
---------- --------

Listen for connection on L RST,U,L,l{A}

ACC,L,U,S S is passed by NCP to the
user and connection from
U to L is closed.

STR,S+1,U+2,B{s} STR,U+3,S,B{u}

RTS,S,U+3,l{B} RTS,U+2,S+1,l{c}

Wait for connection Wait for connection

ALL,l{B},m{B},b{B} ALL,l{c},m{c},b{c}

ACC 命令的另一种替代方案, 是给 CLS 命令再加一个参数 (32 位长)。若该参数为零, 则用户发起的连接请求被拒绝; 若该参数非零, 则请求被接受, 而套接字 S 就是该参数的值。

所有建议的改动都能同时从美观和效率两方面改善 ICP 的对话。不过, 我们强烈倾向于第一种方案, 即对 ICP 作较大规模的改动。