[cse491] broken pipe when testing with script
Steve Wakeford
wakeford at msu.edu
Mon Sep 28 17:54:36 PDT 2009
First, I believe I am implementing all correctly but I am occasionally
getting a "socket.error: (32, 'Broken pipe')" exception.
I believe this is because my test script is closing the connection
before the server has sent its echo. If I put in a pause (i.e.
time.sleep(1)) before my socket.close() calls everything works fine.
Is this acceptable/expected behavior or must this be corrected/handled?
Second, should the server only be echoing on newline? Currently I am
echoing every character as it comes in (including the '\n' and '.'
before ending connection). Just want to know if that's OK in
consideration of future projects.
Thanks,
-Steve
More information about the cse491-fall-2009
mailing list