예제 #1
0
        /// <summary>
        /// Stop listening on the socket and flush the <see cref="LogBuffer"/>
        /// </summary>
        public void Stop()
        {
            if (_socket != null)
            {
                _socket.Close();
                _socket = null;
            }

            if (_sendSocket != null)
            {
                _sendSocket.Close();
                _sendSocket = null;
            }

            if (_buffer != null)
            {
                _buffer.Flush();
            }
        }
예제 #2
0
        /// <summary>
        /// Stop listening on the socket and flush the <see cref="LogBuffer"/>
        /// </summary>
        public void Stop()
        {
            if (this.socket != null)
            {
                this.socket.Close();
                this.socket = null;
            }

            if (this.sendSocket != null)
            {
                this.sendSocket.Close();
                this.sendSocket = null;
            }

            if (buffer != null)
            {
                buffer.Flush();
            }
        }