Second assignment solution


It might not be the cleanest approach but I try to keep the line count low. You may download this server code that performs as required on the assignment#2 text.

What you may find weird is the fact that a timeout message is printed every 10 seconds when an upload is not taking place (therefore block number is zero). If you do not like this you can add an “if” sentence not to print that unless block number is larger than zero, but for me it serves as a sign that the server is up and running even when a file is not being received.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: