can anyone help me with an assertion error writing to a socket?