private static void Read(IrcConnectionReceiveBuffer buffer, String str)
            {
                var syncRoot = new Object();
                var stream = CreateStream(str);

                lock (syncRoot)
                {
                    buffer.BeginReadFrom(stream, ar =>
                    {
                        buffer.EndReadFrom(stream, ar);

                        lock (syncRoot)
                        {
                            Monitor.Pulse(syncRoot);
                        }
                    });

                    Monitor.Wait(syncRoot);
                }
            }
 public IrcConnectionReceiveBufferTest()
 {
     var connection = new IrcConnection(new IPEndPoint(IPAddress.Parse("147.32.80.79"), 6667));
     connection.State = IrcConnectionState.Opened;
     _buffer = new IrcConnectionReceiveBuffer(100, connection);
 }