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


Groups > comp.programming > #5443 > unrolled thread

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

Started byDaniel Pitts <newsgroup.nospam@virtualinfinity.net>
First post2015-05-19 17:25 -0700
Last post2015-05-20 07:38 -0700
Articles 3 — 2 participants

Back to article view | Back to comp.programming


Contents

  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

#5443 — Sending Telnet “DON'T” or “WON'T” after having a successful a “DO” or “WILL”.

FromDaniel Pitts <newsgroup.nospam@virtualinfinity.net>
Date2015-05-19 17:25 -0700
SubjectSending Telnet “DON'T” or “WON'T” after having a successful a “DO” or “WILL”.
Message-ID<4wQ6x.38225$yI2.34601@fx19.iad>
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.

[toc] | [next] | [standalone]


#5444

FromMichael Griffin <mrmisticismo@hotmail.com>
Date2015-05-20 00:17 -0500
Message-ID<555C18D1.5070005@hotmail.com>
In reply to#5443
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.

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

[toc] | [prev] | [next] | [standalone]


#5445

FromDaniel Pitts <newsgroup.nospam@virtualinfinity.net>
Date2015-05-20 07:38 -0700
Message-ID<h%07x.27117$Py6.14530@fx17.iad>
In reply to#5444
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.



[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming


csiph-web