From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- pipermail/nel/2001-March/000352.html | 80 ++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 pipermail/nel/2001-March/000352.html (limited to 'pipermail/nel/2001-March/000352.html') diff --git a/pipermail/nel/2001-March/000352.html b/pipermail/nel/2001-March/000352.html new file mode 100644 index 00000000..def14384 --- /dev/null +++ b/pipermail/nel/2001-March/000352.html @@ -0,0 +1,80 @@ + + + + [Nel] newbies about packet schema + + + + + + +

[Nel] newbies about packet schema

+ Kenneth Duda + kjd@cs.stanford.edu
+ Sat, 3 Mar 2001 02:02:34 -0800 +

+
+ +
> I have read artice for winsock program, if folling article is
+> true, that snow ball netowrk driver , should change it's packet
+> schema.  any one can give me suggect ?
+
+I am not familiar with the snowball protocol ("packet schema").
+However, I assure you that the article is correct --- attempting
+to turn TCP from a byte stream into a sequenced message stream by
+disabling Nagle will not work.  The only way to implement message
+semantics on top of TCP is to add your own packetization to the
+byte stream.  For example,
+
+
+  void SendMessage( int socket, const void * buf, size_t length ) 
+  {
+    long l = htonl( length );
+    write( socket, &l, 4 );
+    write( socket, buf, length );
+  }
+
+  void RecvMessage( int socket, void * buf, size_t * length ) 
+  {
+    long l;
+    read( socket, &l, 4 );
+    l = ntohl( l );
+    assert( l < *length );
+    *length = l;
+    read( socket, buf, length );
+  }
+
+
+-Ken
+
+Kenneth J. Duda
+Stanford University Distributed Systems Group
+<kjd@cs.stanford.edu>
+
+
+
+ + +
+

+ -- cgit v1.2.1