<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Tim Miller</b> <span dir="ltr">&lt;<a href="mailto:mille449@gmail.com">mille449@gmail.com</a>&gt;</span><br>Date: Fri, Oct 16, 2009 at 10:47 PM<br>
Subject: Re: [cse491] Lab 7 changes<br>To: Joe Amenta &lt;<a href="mailto:amentajo@msu.edu">amentajo@msu.edu</a>&gt;<br><br><br>__main__ creates an instance of your webserve.Server class then calls Server.serve_forever().  That is all.  The serve_forever() function will bind the port then enter the &#39;main&#39; while loop to accept connections and pass them to handle_connection().  <br>

<br>If you look in the new test_webserve.py you can see how it will be called.  Webserve_Test._run_fake_socket() is a replacement for our serve_forever() function, so our serve_forever() function should do the same thing but with a real socket.<br>

<br>Those are pretty much the same as before, most of the changes for the project come in the splitting up the parse_request() function into a wsgi app and the means to call it correctly. <br><font color="#888888"><br><br>
--tim</font><div><div></div><div class="h5"><br><br><br><br>
<div class="gmail_quote">On Fri, Oct 16, 2009 at 5:32 PM, Joe Amenta <span dir="ltr">&lt;<a href="mailto:amentajo@msu.edu" target="_blank">amentajo@msu.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Also, there&#39;s this in the lab notes:<br>
<br>
Next, get your &#39;server_forever&#39; and __main__ code working (it should<br>
all still work as in HW #5).<br>
<font color="#888888"><br>
--Joe<br>
</font><div><div></div><div><br>
On Fri, Oct 16, 2009 at 5:31 PM, Joe Amenta &lt;<a href="mailto:amentajo@msu.edu" target="_blank">amentajo@msu.edu</a>&gt; wrote:<br>
&gt; A little bit of an ambiguity...  in the homework notes, you write:<br>
&gt;     Server.handle_forever() must bind to the given port and serve HTTP<br>
&gt; requests on it forever, calling the WSGI app object for each request.<br>
&gt;<br>
&gt; But in the lab notes, you write:<br>
&gt;     write a method &#39;Server.serve_forever()&#39; that does your main while loop.<br>
&gt;     change your __main__ block to run Server.serve_forever() on the<br>
&gt; appropriate port.<br>
&gt;<br>
&gt; Which is it?<br>
&gt;<br>
&gt; *ducks the shoe Titus is about to throw*<br>
&gt;<br>
&gt; --Joe<br>
&gt;<br>
&gt; On Fri, Oct 16, 2009 at 11:23 AM, C. Titus Brown &lt;<a href="mailto:ctb@msu.edu" target="_blank">ctb@msu.edu</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; thanks again!<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Oct 15, 2009 at 05:40:10PM -0400, Joe Amenta wrote:<br>
&gt;&gt; &gt; Also, don&#39;t forget to change environ[&#39;wsgi_input&#39;] to environ[&#39;wsgi.input&#39;].<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --Joe<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Thu, Oct 15, 2009 at 05:16:54PM -0400, Joe Amenta wrote:<br>
&gt;&gt; &gt; &gt; Don&#39;t forget to:<br>
&gt;&gt; &gt; &gt; --def WSGIApp(object) -&gt; class WSGIApp(object)<br>
&gt;&gt; &gt; &gt; --return [&#39;Hello, world&#39;] -&gt; return iter([&#39;Hello, world&#39;])<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; --Joe<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; C. Titus Brown, <a href="mailto:ctb@msu.edu" target="_blank">ctb@msu.edu</a><br>
&gt;<br>
<br>
_______________________________________________<br>
cse491-fall-2009 mailing list<br>
<a href="mailto:cse491-fall-2009@lists.idyll.org" target="_blank">cse491-fall-2009@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/cse491-fall-2009" target="_blank">http://lists.idyll.org/listinfo/cse491-fall-2009</a><br>
</div></div></blockquote></div><br>
</div></div></div><br>