File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def client(msg, log_buffer=sys.stderr):
2020 try :
2121 print ('sending "{0}"' .format (msg ), file = log_buffer )
2222 # TODO: send your message to the server here.
23- sock .sendall (b'This tornado loves you' )
23+ sock .sendall (msg . encode ( 'utf8' ) )
2424 # TODO: the server should be sending you back your message as a series
2525 # of 16-byte chunks. Accumulate the chunks you get to build the
2626 # entire reply from the server. Make sure that you have received
@@ -43,6 +43,7 @@ def client(msg, log_buffer=sys.stderr):
4343 # TODO: when all is said and done, you should return the entire reply
4444 # you received from the server as the return value of this function.
4545 print ('Received' , repr (received_message ))
46+ return received_message
4647
4748if __name__ == '__main__' :
4849 if len (sys .argv ) != 2 :
You can’t perform that action at this time.
0 commit comments