Does Asyncore Send require newline?

Steve Holden steve at
Tue Nov 1 03:59:05 CET 2005

John W wrote:
> Hello,
> I have a test environment that consists of a server and an application that
> opens an asyncore socket and communicates with it.
> In my application, on the handle_write call, if I do not append a "\n" to my
> message the server never gets the message. If I do append it, the server can
> read the message and act accordingly.
> So my call looks like this:
> self.send( message] + "\n")
> Is this how it was designed? Do you have to send a '\n' to have the data
> read? I can't find a whole lot of documentation on the send method.
> If you could offer some help, I would appreciate it.
The short answer to your question is "no, send() does not require 
newline". But much depends on your protocol design and on explicit 
details of your client and server software. You'd probably have to post 
a bit more code before we could say why you are seeing what you are seeing.

Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC           
PyCon TX 2006        

More information about the Python-list mailing list