Does it even really matter? serve_forever is never being called by the tests, and therefore the port doesn&#39;t really matter at all.  In run_fake_socket we can see:<div><div><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><pre style="word-wrap: break-word; white-space: pre-wrap; ">
server = webserve_nb.NonblockingServer(&#39;&#39;, hello_app)

done, data = server.handle_connection(sock)</pre><pre style="word-wrap: break-word; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family: arial; white-space: normal; font-size: small; "><div>He&#39;s not doing anything over any sort of a network in the tests, but rather creating fake sockets which emulate what a real socket would do. Hence:</div>
<div><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><pre style="word-wrap: break-word; white-space: pre-wrap; ">class fake_nb_client_sock_obj(fake_client_sock_obj):</pre><pre style="word-wrap: break-word; white-space: pre-wrap; ">
<span class="Apple-style-span" style="font-family: arial; white-space: normal; font-size: small; ">Mine does nothing with the port &#39;&#39;, and passes the tests fine. I suppose you could for the sake of bad input, but to get your code to work with his tests, nothing extra is needed.</span></pre>
<pre style="word-wrap: break-word; white-space: pre-wrap; "><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="font-size: small; white-space: normal;">The other Joe</span></font></pre></span></div>
</span></pre></span><br><div class="gmail_quote">On Wed, Oct 28, 2009 at 9:07 PM, Steve Wakeford <span dir="ltr">&lt;<a href="mailto:wakeford@msu.edu">wakeford@msu.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I am a little stumped as to why the Blocking server is instantiated in the hw7 tests with<br>
<br>
server = webserve.Server(8000, app)<br>
<br>
but the Non-blocking server is instantiated with<br>
<br>
server = webserve_nb.NonblockingServer(&#39;&#39;, hello_app)<br>
<br>
Notice the first argument is an integer in the former and a string in the latter. Is it just me or am I missing something? How do we deal with this (for non-blocking) since the port should be dynamically passed in upon instantiation from a command line argument?<br>

<br>
My goal is to subclass the Blocking server and only to override its __init__() and serve_forever() methods. Any ideas?<br>
<br>
Thanks,<br>
-Steve<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>
</blockquote></div><br></div></div>