Feedback from Imre processed

Magic number for port updated
Handle close of socket on failure of recv
Pass NULL for wait
No variable assignment in switch
Unnecessary use of decleration
Const content-type