Some corrections added due to 32-64 compatibility. 
Added tests on so_linger option.