Novell.Directory.Ldap.Message.sendMessage C# (CSharp) Method

sendMessage() private method

private sendMessage ( ) : void
return void
        internal void sendMessage()
        {
            conn.writeMessage(this);
            // Start the timer thread
            if (mslimit != 0)
            {
                // Don't start the timer thread for abandon or Unbind
                switch (msg.Type)
                {

                    case LdapMessage.ABANDON_REQUEST:
                    case LdapMessage.UNBIND_REQUEST:
                        mslimit = 0;
                        break;

                    default:
                        timer = new Timeout(this, mslimit, this);
                        timer.IsBackground = true; // If this is the last thread running, allow exit.
                        timer.Start();
                        break;

                }
            }
            return ;
        }

Usage Example

示例#1
0
        /// <summary> Send a request to the server.  A Message class is created
        /// for the specified request which causes the message to be sent.
        /// The request is added to the list of messages being managed by
        /// this agent.
        ///
        /// </summary>
        /// <param name="conn">the connection that identifies the server.
        ///
        /// </param>
        /// <param name="msg">the LdapMessage to send
        ///
        /// </param>
        /// <param name="timeOut">the interval to wait for the message to complete or
        /// <code>null</code> if infinite.
        /// </param>
        /// <param name="queue">the LdapMessageQueue associated with this request.
        /// </param>
        /* package */
        internal void sendMessage(Connection conn, LdapMessage msg, int timeOut, LdapMessageQueue queue, BindProperties bindProps)
        {
            // creating a messageInfo causes the message to be sent
            // and a timer to be started if needed.
            Message message = new Message(msg, timeOut, conn, this, queue, bindProps);

            messages.Add(message);
            message.sendMessage(); // Now send message to server
        }
All Usage Examples Of Novell.Directory.Ldap.Message::sendMessage