< NETINFO, NIC15393.NLS.6, >, 1-Feb-78 22:19 JAKE ;;;;
.DefaultFont=10p,Newsgothic,Medium; .LMBase=,1.0;
.HJournal="TELNET APPROXIMATE MESSAGE SIZE NEGOTIATION OPTION"; 
.HJFont=10p,Newsgothic,Bold;
.H1="NIC 15393 (Aug. 1973)"; .H1Font=10p,Newsgothic,Bold; .H1Sw=On;
.HJP=OddR; .H1P=OddR; .BM=54,10.0; .HJRM=72,6.5; .RM=72,6.5; .BRM=72,6.5; 
.SNF=Off; .YBS=1; .H2Sw=Off;   .F=".GPN;"; .FFont=10p,Newsgothic,Medium; 
.Text[TU0]=".Tabto=U0+1,U0;"; .Text[TU1]=".Tabto=U1+1,U1;";
.PN=0; .NumDash=0; .BP=FL,J;
.Text[MB]=".BP=,FL;.Bfont=9p,Newsgothic,Medium+Mono;";
.Text[ME]=".BP=,J;.Bfont=10p,Newsgothic,Medium;";
.Text[BB]=".BP=,J;.Bfont=10p,Newsgothic,Bold;";.PES;
.Center;.BB;TELNET Approximate Message Size Negotiation Option.ME;.GCR;
1. Command name and code.
   NAMS          4
      (Negotiate Approximate Message Size)
2. Command meanings.
   IAC WILL NAMS
      The sender of this command requests, or agrees, to negotiate the 
      approximate size for messages of data characters it sends.
   IAC WON'T NAMS
      The sender of this command refuses to negotiate the approximate size for 
      messages of data characters it sends.
   IAC DO NAMS
      The sender of this command requests the receiver of this command to 
      negotiate the approximate size for messages of data characters 
      transmitted by the command receiver.
   IAC DON'T NAMS
      The sender of this command refuses to negotiate the approximate size for 
      messages of data characters transmitted by the command receiver.
   IAC SB NAMS DR <16 bit value>
      The sender of this command requests the receiver of this command to set 
      its approximate message size for data the command receiver transmits to 
      the value specified in the 16 bit parameter, a data character count.  The
      code for DR (Data Receiver) is 0.
   IAC SB NAMS DS <16 bit value>
      The sender of this command requests or agrees to set its approximate 
      message size for data it transmits to the value specified in the 16 bit 
      parameter, a data character count.  The code for DS (Data Sender) is 1. 
      .PES;
3. Default
   WON'T NAMS
   DON'T NAMS
      i.e., no attempt will be made to agree on a message size.
4. Motivation for the option.
   The TELNET protocol does not specify how many characters the transmitter of 
   data should attempt to pack into messages it sends.  However, 1) some 
   receivers may prefer received messages to generally have some minimum size, 
   for example, to lessen the burden of processing input interrupts; 2) some 
   receivers may prefer received data messages to generally have some maximum 
   size, for example, because the maximum data message size could be used in 
   conjunction with the Host/Host protocol message and bit allocates to more 
   efficiently utilize input buffer space; 3) some transmitters may have 
   maximum sizes for transmitted data messages, information which could be used
   in conjunction with the Host/Host protocol message and bit allocates to more
   efficiently utilize the receiver's input buffer space; and 4) some 
   transmitters may desire to transmit some minimum size message, for example, 
   to lessen the burden of processing output interrupts.
   Therefore, it is desirable to have some mechanism whereby the parties 
   involved can attempt to agree on the approximate size of messages 
   transmitted over the connection.  (It might be even more powerful to be able
   to negotiate approximate or even exact upper and lower bounds on message 
   size.  However, fixed bounds would sometimes be hard to manage and sometimes
   even in conflict with Host/Host protocol allocates; and specifying both 
   upper and lower bounds, even approximately, seems overly complicated 
   considering the expected payoff.)
5. Description of the option.
   With the option which specifies the approximate size of messages transmitted
   over the connection, the transmitter attempts to send messages of the 
   specified size unless some other constraint (for instance, an end of line) 
   requires the message to be sent sooner, or characters for transmission 
   arrive so fast that the message has to be bigger than the specified size.  
   The option is to be used strictly to improve the STATISTICS (e.g., timing 
   and buffering) of message reception and transmission -- the option does NOT 
   specify any absolutes.
   With this option not in effect, message size is completely (even 
   statistically) undefined as per the NVT specification.
   Once the data transmitter and receiver have agreed to negotiate the 
   approximate message size, they must actually do this negotiation.  This is 
   done using the DS and DR SB commands.  The transmitter of data messages may 
   give the SB NAMS DS command and the receiver may give the SB NAMS DR 
   command.  The rules for negotiation of the acutal aproximate message size 
   are as follows:
      .U1=X;a.  .U0=X;.IRest=U0-U1,U0-U1;Either party may at any time send a SB
      command specifying a value less than any previously sent or received and 
      immediately assume that that value has been agreed upon.
      b.  .TU0;If either party receives a SB command, the party should assume 
      the value specified in the received command is in effect if the party has
      not previously sent a SB command specifying a lower value.
      c.  .TU0;Before any SB command is sent, the approximate message size is 
      undefined.
      d.  .TU0;At any time either party may quit the whole thing by sending a 
      DON'T or WON'T NAMS command which must be acknowledged and the 
      approximate message length becomes undefined.
      e.  .TU0;An approximate message size value may not be less than 
      one..IRest=0;
   As the receiver and transmitter may have conflicting requirements for the 
   approximate message size, neither should be cavalier about requesting a 
   specified approximate message size, each "bending over backward" to let the 
   other party (who should be presumed to have a greater need) specify the 
   approximate message size.
   Host/Host protocol allocate considerations, of course, always dominate 
   negotiated message size considerations.
