Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: Michael Griffin Newsgroups: comp.programming Subject: Re: Sending Telnet =?UTF-8?B?4oCcRE9OJ1TigJ0gb3Ig4oCcV09OJ1TigJ0g?= =?UTF-8?B?YWZ0ZXIgaGF2aW5nIGEgc3VjY2Vzc2Z1bCBhIOKAnERP4oCdIG9yIOKAnFdJTEw=?= =?UTF-8?B?4oCdLg==?= Date: Wed, 20 May 2015 00:17:05 -0500 Organization: Aioe.org NNTP Server Lines: 30 Message-ID: <555C18D1.5070005@hotmail.com> References: <4wQ6x.38225$yI2.34601@fx19.iad> NNTP-Posting-Host: kVHuDFcLK9BB4lxkjbK3nw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.programming:5444 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