socket write test