fix: should return the number of bytes sent.