Fixed: replaced reserved socket event error with err.
Finished tests for sockets module.