HTTPParser and Socket fix errors

Due to the new version of swift appeared some compilation errors. These
errors are fixed changing the old methods by the new signature methods.