If you really want:
from twisted.protocols.basic import LineReceiver
class LFLineReceiver(LineReceiver):
delimiter = '\n'
I'm assuming that it being '\r\n' by default is because more of the
protocols that use LineReceiver use '\r\n' as their delimiter. It's
not entirely hard to s
On Thu, Jan 12, 2012 at 8:57 PM, Augusto Mecking Caringi
wrote:
> Right.
>
> But there is an interesting fact:
>
> "nc" and "openssl s_client", two utilities that I use every day to
> connect to diferent types of servers send only LF as default...
"nc" and "openssl s_client" read bytes from stdin
On Thu, Jan 12, 2012 at 4:33 PM, Glyph wrote:
> On Jan 12, 2012, at 1:06 PM, Augusto Mecking Caringi wrote:
>
> "Most textual Internet protocols (including HTTP, SMTP, FTP, IRC and
> many others) mandate the use of ASCII CR+LF (0x0D 0x0A) on the
> protocol level, but recommend that tolerant applic
On Jan 12, 2012, at 1:06 PM, Augusto Mecking Caringi wrote:
> "Most textual Internet protocols (including HTTP, SMTP, FTP, IRC and
> many others) mandate the use of ASCII CR+LF (0x0D 0x0A) on the
> protocol level, but recommend that tolerant applications recognize
> lone LF as well."
[citation ne
Thanks for the link, added to code as comment.
On Jan 12, 2012, at 10:06:16AM, Augusto Mecking Caringi wrote:
> On Thu, Jan 12, 2012 at 3:56 PM, Mike Winter wrote:
>> That helps, thanks.
>>
>> I know that http processing does \r\n, I suppose there is an rfc that says
>> this is reasonable, and
On Thu, Jan 12, 2012 at 3:56 PM, Mike Winter wrote:
> That helps, thanks.
>
> I know that http processing does \r\n, I suppose there is an rfc that says
> this is reasonable, and LineReceiver is designed to be used in http for the
> same reason.
"Most textual Internet protocols (including HTTP,
> That helps, thanks.
>
> I know that http processing does \r\n, I suppose there is an rfc that says
> this is reasonable, and LineReceiver is designed to be used in http for
> the same reason.
So does telnet, smtp, ftp, etc..
___
Twisted-Python mailin
That helps, thanks.
I know that http processing does \r\n, I suppose there is an rfc that says this
is reasonable, and LineReceiver is designed to be used in http for the same
reason.
On Jan 12, 2012, at 4:42:45AM, Itamar Turner-Trauring wrote:
> At a guess, it's because by default LineReceiv
At a guess, it's because by default LineReceiver splits on '\r\n', but
you're sending only '\n'.
-Itamar
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
i can telnet to the port given in test-code below and it interacts
appropriately. The connection is to a regular portforwarder and the server is
an Answer-server:
class Answer(LineReceiver):
answers = {'How are you?': 'Fine',
'no': 'No!?!',
None : "I don't know
10 matches
Mail list logo