XMLSocket flush?

I have an XMLSocket that connects to my socket server (small Java app I wrote). I know it connects. and I know it can receive data. But when I try to send data from flash it dosen’t seem to send until I break the connection (close the socket). Any ideas what might cause this?