replace read/write with recv/send
replace read/write with recv/send