Implemented socket write test.