Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #5445

Re: Sending Telnet “DON'T” or “WON'T” after having a successful a “DO” or “WILL”.

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!fx17.iad.POSTED!not-for-mail
From Daniel Pitts <newsgroup.nospam@virtualinfinity.net>
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
MIME-Version 1.0
Newsgroups comp.programming
Subject Re: Sending Telnet “DON'T” or “WON'T” after having a successful a “DO” or “WILL”.
References <4wQ6x.38225$yI2.34601@fx19.iad> <555C18D1.5070005@hotmail.com>
In-Reply-To <555C18D1.5070005@hotmail.com>
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
Lines 57
Message-ID <h%07x.27117$Py6.14530@fx17.iad> (permalink)
X-Complaints-To abuse@newsrazor.net
NNTP-Posting-Date Wed, 20 May 2015 14:38:05 UTC
Date Wed, 20 May 2015 07:38:11 -0700
X-Received-Bytes 3160
X-Received-Body-CRC 3905187893
Xref csiph.com comp.programming:5445

Show key headers only | View raw


On 5/19/15 10:17 PM, Michael Griffin wrote:
> On 5/19/2015 7:25 PM, Daniel Pitts wrote:
>> I apologize if this is off topic, not quite sure where else to ask.
>>
>> I'm implementing my own Telnet library in Java (just because).  I'm
>> wondering if my library should allow sending a "WONT" or "DONT" that was
>> otherwise unsolicited.  I'm also wondering if my library should reply to
>> unsolicited "DONT" or "WONT" requests with the "WONT" or "DONT" reply
>> respectively.  The RFC isn't quite clear on that part of the contract.
>>
>> All of this is assuming that I've already sent a DO and got a WILL, or
>> visa versa.
>>
>>
>> Thanks,
>> Daniel.
>
> Well usually the server is the one that initiates the negotiation.
My library's first use is actually a server, but Telnet is fully 
symmetric at the protocol layer, so "usual" isn't what I was thinking of.
>
> If it's a client, then it should usually respond back with what the
> server is querying like BINARY, ECHO, NAWS etc.. But of course if an
> expected response is not received by the client, it is allowed to ask
> the server for it's preference. Unsolicited response are allowed, and
> can either be responded to, or ignored.
>
> You want to be aware of possible loops where responses keep exchanging
> back and forth between the server and client well after they been answered.
>
> Michael
> telnet://htc.zapto.org
>


I'm thinking in particular after having said "IAC WILL <FOO>", and 
receiving a "IAC DO <FOO>",  can I later sao "IAC WONT <FOO>" to stop 
FOOing?  And when I do that, will I receive an acknowledgement?

Another way to ask this is:
If I received a "IAC DO <FOO>" after a "IAC WILL <FOO>", the other side 
has the ability to change its mind "IAC DON'T <FOO>".  When they do 
that, should I reply with "IAC WON'T <FOO>", or just silently accept the 
new state of affairs?

I think I realized the answer: If I receive a command that changes my 
state, then I should acknowledge with the new state.  Defensive 
programming says I shouldn't expect an acknowledgement, but handle one 
cleanly.

If I disable an option changes my handling of the data stream, I 
shouldn't disable the processing until the byte after the response of 
IAC DON'T/WON'T.



Back to comp.programming | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Sending Telnet “DON'T” or “WON'T” after having a successful a “DO” or “WILL”. Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2015-05-19 17:25 -0700
  Re: Sending Telnet “DON'T” or “WON'T” after having a successful a “DO” or “WILL”. Michael Griffin <mrmisticismo@hotmail.com> - 2015-05-20 00:17 -0500
    Re: Sending Telnet “DON'T” or “WON'T” after having a successful a “DO” or “WILL”. Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2015-05-20 07:38 -0700

csiph-web