<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Yes it matters because if we forget about just passing the tests for a
minute, the original implies that you are calling the server class
constructor with a port (integer) and an app and the second implies a
hostname (string) and an app. Consistency would be favorable, no?<br>
<br>
Note that yes, if I do hard code this as Amenta suggested all of the
tests pass, thanks to both Joes for assistance.<br>
<br>
Joseph Blossom wrote:
<blockquote
 cite="mid:319d13b50910281843g708c1233x6473a63b511cc2dd@mail.gmail.com"
 type="cite">Does it even really matter? serve_forever is never being
called by the tests, and therefore the port doesn't really matter at
all. &nbsp;In run_fake_socket we can see:
  <div>
  <div><span class="Apple-style-span"
 style="font-family: Times; font-size: medium;">
  <pre style="">server = webserve_nb.NonblockingServer('', hello_app)

done, data = server.handle_connection(sock)</pre>
  <pre style=""><span class="Apple-style-span"
 style="font-family: arial; white-space: normal; font-size: small;"><div>He'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="">class fake_nb_client_sock_obj(fake_client_sock_obj):</pre><pre
 style=""><span class="Apple-style-span"
 style="font-family: arial; white-space: normal; font-size: small;">Mine does nothing with the port '', 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=""><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 moz-do-not-send="true"
 href="mailto:wakeford@msu.edu">wakeford@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;">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('', 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 moz-do-not-send="true"
 href="mailto:cse491-fall-2009@lists.idyll.org" target="_blank">cse491-fall-2009@lists.idyll.org</a><br>
    <a moz-do-not-send="true"
 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>
</blockquote>
</body>
</html>