Ejemplo n.º 1
0
 /// <summary>
 /// Fires the <see cref="TcpListenerWrapper.ConnectionReceived"/> event.
 /// </summary>
 protected void OnConnectionReceived(TcpWrapper wrapper)
 {
     if (this.ConnectionReceived != null)
     {
         this.ConnectionReceived(this, new ConnectionReceivedEventArgs(wrapper));
     }
 }
Ejemplo n.º 2
0
        internal IrcClient(IrcNetwork network, TcpWrapper wrapper)
        {
            this.Network = network;
            this._client = wrapper;
            this._client.LineReceived     += Client_DataReceived;
            this._client.ConnectionClosed += Client_ConnectionClosed;

            this.Ctcp = new CtcpClient();

            IdentServer.UserNameNeeded += IdentServer_UserNameNeeded;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Creates a new <see cref="IrcNetwork"/> using the specified <see cref="TcpWrapper"/>.
        /// </summary>
        /// <param name="wrapper">The <see cref="TcpWrapper"/>.</param>
        public IrcNetwork(TcpWrapper wrapper)
        {
            this.Client = new IrcClient(this, wrapper);
            this.SetClient(this.Client);
            this.HostName    = wrapper.HostName;
            this.Port        = wrapper.Port;
            this.UsesSsl     = wrapper.UsesSsl;
            this.CurrentUser = new IrcUser(this.Client, this);
            this.ServerUser  = new IrcUser(this.Client, this)
            {
                Nickname = this.HostName
            };

            this.KnownChannelsInternal = new ObservableCollection <IrcChannel>();
            this.KnownUsersInternal    = new ObservableCollection <IrcUser>();
            this.KnownChannels         = new ReadOnlyObservableCollection <IrcChannel>(this.KnownChannelsInternal);
            this.KnownUsers            = new ReadOnlyObservableCollection <IrcUser>(this.KnownUsersInternal);
            this.KnownUsersInternal.Add(this.CurrentUser);
            this.KnownUsersInternal.Add(this.ServerUser);
            this.Parameters = new IrcNetworkParameters();
        }
Ejemplo n.º 4
0
 internal ConnectionReceivedEventArgs(TcpWrapper wrapper)
 {
     this.ConnectionWrapper = wrapper;
 }