Randomly get a emtpy message in networkstream Read
<p>I am doing a multiple channels chatting project.
Everytime a client joined a channel, the server will broadcast the message that someone joined.</p>

<p>I have to make sure that the client only receive message belong to the channel that they are currently in. 
So i did something like    clientName$channelName^
                           clientName$JoinedChannelName^
I used $ and ^ to tell the program which substring is client name and channel name.
And of course, the program needs to know how to extract the channelName when the server is broadcast a client join event or a client message sent event, because then it can determine if the message belong to this channel.</p>

<p>things are fine but...
The broadcasting of client Joined is fine, and after i type some words that are supposed to send to the channel and the channel broadcast it correctly. BUT SOMEHOW, the client gets another empty message on it's networks stream.read.  I checked the server and it didn't do any unnecessary broadcast. The empty message isn't a big issue, it can be easily fixed, but i want to know why...Please help if you encounter similar situation before,</p>

<p>Here is the trouble part of the code, i cannot give the entire codes since its awfully long...</p>

<pre><code>            string chan_name = null;
            serverStream = clientSocket.GetStream();
            int buffSize = 0;
            byte[] inStream = new byte[10025];
            buffSize = clientSocket.ReceiveBufferSize;
            MessageBox.Show("Waiting for client input");
            serverStream.Read(inStream, 0, buffSize);
            MessageBox.Show("got client input");
</code></pre>
