MongoDBDriver/Connection.cs
/// <summary>
/// Used for sending a message that gets no reply such as insert or update.
/// </summary>
/// <param name="msg"></param>
/// <returns></returns>
/// <exception cref="IOException">A reconnect will be issued but it is up to the caller to handle the error.</exception>        
Used for sending a message that gets no reply such as insert or update.
Used for sending a message that gets no reply such as insert or update .
public void SendMessage(RequestMessage msg){
            if (this.State != ConnectionState.Opened){
                throw new MongoCommException("Operation cannot be performed on a closed connection.", this);
            }
            try{
                lock(tcpclnt){
                    msg.Write(tcpclnt.GetStream()); 
                }
            }catch(IOException){
                this.Reconnect();
                throw;
            }
        }
public void SendMessage ( RequestMessage msg ) { if ( this . State != ConnectionState . Opened ) { throw new MongoCommException ( " " , this ) ; } try { lock ( tcpclnt ) { msg . Write ( tcpclnt . GetStream ( ) ) ; } } catch ( IOException ) { this . Reconnect ( ) ; throw ; } }
Used for sending a message that gets no reply such as insert or update.
Used for sending a message that gets no reply such as insert or update .
//Sending doesn't seem to always trigger the detection of a closed socket.
None
A reconnect will be issued but it is up to the caller to handle the error.
A reconnect will be issued but it is up to the caller to handle the error .
msg
RequestMessage
None