Path: csiph.com!usenet.pasdenom.info!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.04; 'messages.': 0.05; 'extent': 0.07; 'lesser': 0.07; 'badly': 0.09; 'boundaries': 0.09; 'http': 0.09; 'subject:trying': 0.09; 'cc:addr :python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'ftp,': 0.16; 'imap,': 0.16; 'nearest': 0.16; 'reinvent': 0.16; 'smtp,': 0.16; 'tcp': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'subject:] ': 0.20; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'protocols': 0.31; 'but': 0.35; 'received:google.com': 0.35; '14,': 0.36; 'sequence': 0.36; 'internet': 0.71; 'goal': 0.75; 'edwards': 0.91; 'to:none': 0.92; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=48ATY7DlC2OImpD38oXLCRu9AYlNJ3Bu2ckTJ5k5NfE=; b=qBnp6yCMXQ+1CiL8HWgPeeQKQEsCNKCO61R9rVR0f6JUZnCSIMI+eTQ+y3MBs/eYhK jZiBEdntrc6i4hENwaY9hasOPZ0NicDqiilBsjcxCDsSN9wJ7+m98C/wVILIrC6zpvWY vyFz0B/SodbzIZzllSh/Iu/bLYe1Xj+UP4gGbjCLYslo5bL/aeDoeHVFQKUsRO7LkNIW r9y15GvbBFkUEg5ReuqaBEGAEVM298nm+8kw4GNN5UeNVhw1gCT5yt6x1zmGmIAxkORY z8j9gryFm0FjQkc989MiSNxzQuA1um4pYCpo2mP4tMm+7vSrIIQp/DbA3E9zL5WVgqIl fqUg== MIME-Version: 1.0 X-Received: by 10.68.111.33 with SMTP id if1mr4277605pbb.31.1386951561404; Fri, 13 Dec 2013 08:19:21 -0800 (PST) In-Reply-To: References: Date: Sat, 14 Dec 2013 03:19:21 +1100 Subject: Re: [newbie] trying socket as a replacement for nc From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386951891 news.xs4all.nl 2958 [2001:888:2000:d::a6]:56658 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61831 On Sat, Dec 14, 2013 at 3:10 AM, Grant Edwards wrote: > Adding boundaries to a TCP stream achieves the same goal (and isn't > that hard to do), but since there's no standard for it, people keep > having to reinvent it (often badly and always incompaibly). Nearest to a standard would be the way heaps of internet protocols are line-based - SMTP, POP, IMAP, FTP, and to a lesser extent HTTP as well. The end-of-line sequence \r\n delimits messages. ChrisA