Added socket cleanup hooks
indention and minor changes
Added error codes files
Minor changes
Fixed a bug that memsets a req req packet to 0