Send disconnect socket from flash

ok so :


 
               // socket_recv just receives data from $socket as $buffer, with an integer length of 2048, and a mystery flag set to 0 
            // that mystery flag has no real documentation so setting it to 0 will solve it as others have done. 
            // we've also set it as a var $bytes in case we need to ensure data sending with socket_write, which is optional 
           $bytes = socket_recv($socket, $buffer, 2048, 0); 
            
           // if the $bytes we have is 0, then it is a disconnect message from the socket 
           // we will just search for it as an index and unset that socket from our $read_sockets and 
           // finish up with using socket_close to ensure it is closed off 
           if ($bytes == 0) { 
               $index = array_search($socket, $read_sockets); 
               unset($read_sockets[$index]); 
               socket_close($socket);

I need socket_recv($socket, $buffer, 2048, 0); to return zero.

and I looked up the function at http://www.navioo.com/php/docs/function.socket-recv.php

it says :

Return value:

a) on success returns number of bytes read
b) in case of no data on line, returns zero and $buf will be set to NULL.
c) on failure returns false, and $buf will be set to NULL.
To get the error code/message, call the appropriate socket functions.
d) in case of disconnect, the function returns either b) or c) which depends on how connection was closed from the other end. It returns 0 if the connection was closed gracefully with FIN squence and false if it was reset.

ok so how do I send “no data on line” from flash?
i tried (actionscript2.0):
mySocket.send("\x00");
mySocket.send("");
mySocket.send(null);
im not sure what else to do