Solution to assignment#1

As you have asked me for a solution I’m providing you mine.

You can see that as soon as a client does not provide expected command it is kicked out.

This server won’t accept multiple messages sent over the same connection (nor it was required).

An alternative implementation using a finite state machine for the implementation is shown in this other solution.

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: