Added Socket Server code from book