<div dir="ltr">Thanks for the response.  Unfortunately, the &amp;eod doesn&#39;t work with a list, just with bytes.  Because the end of the connection is simply the end of the last byte of actual data, there is no look-ahead token for the list to work. At least that is what it seems to me.<div><br></div><div>Last night I started down another path. I am trying to use a sink construct.  Here is some of the code:</div><div><br></div>







<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">export type WS_Handshake_Success = unit {</font></span></p><p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">        </span>success <span class="gmail-Apple-converted-space">    </span>: /^(HTTP|http)/;</font></span></p><p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">        </span>dvalue<span class="gmail-Apple-converted-space">      </span>: DataValue;</font></span></p><p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">        </span>svrheaders <span class="gmail-Apple-converted-space">    </span>: list&lt;Header&gt; ;</font></span></p><p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">        </span>end_of_hdrs : /\x0d\x0a\x0d\x0a/;</font></span></p><p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">        </span>wss_data : bytes &amp;eod &amp;convert=terminate($$) &amp;transient -&gt; self.sub;</font></span></p><p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">        </span>on %init {</font></span></p><p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">                </span>self.sub.connect(new Sub());</font></span></p><p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">        </span>}</font></span></p><div><font face="monospace, monospace"><span class="gmail-Apple-converted-space" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">        </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">var sub: sink;</span> </font></div><div><font face="monospace, monospace">};</font></div><div><font face="monospace, monospace"><br></font></div><div>







<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">export type Sub = unit {</font></span></p>
</div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">ws_msgs : list&lt;WS_Message&gt;;</font></span></p></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">    </span>: DataEnd;</font></span></p></div></blockquote></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">};</font></span></p></div><div><br></div></blockquote>The terminate function appends a byte sequence (constant DataEnd) to the raw bytes that I can then use to identify the end of the data when parsing the messages in the Sub unit. That way the WS_Messages are properly parsed within the Sub unit. <div><br></div><div>The only piece that I&#39;m working on now is how to put that parsed data back into the original WS_Handshake unit. Right now a &quot;print self&quot; statement of the WS_Handshake just lists sub=&lt;sink&gt;. To get the individual list items to show I need to print the sub unit.</div><div><br></div><div>Is there a way to make the Sub unit a part of the WS_Handshake unit?</div><div><br></div><div>Thank you,</div><div>Jenn<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><br></div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div><br></div></div></div></div>
</div></div>