Start() 공개 메소드

Starts listening on the selected IP address and port.
There was an error while creating the listening socket.
public Start ( ) : void
리턴 void
예제 #1
0
        /// <summary>
        /// Loads the listeners list from an XML file.
        /// </summary>
        /// <param name="reader">The XML reader to read the users from.</param>
        private void LoadListeners(XmlTextReader reader)
        {
            // Read until we reach the Listeners element end tag
            Listener listener = null;

            while (reader.Read() && reader.Name.ToLower() != "listeners")
            {
                if (reader.Name != null && reader["value"] != null && reader["type"] != null)
                {
                    listener = Parent.CreateListener(reader["type"], reader["value"]);
                    if (listener != null)
                    {
                        try {
                            listener.Start();
                        } catch {}
                        Parent.AddListener(listener);
                    }
                }
            }
        }
예제 #2
0
 private void AddListener(Guid id, Listener newItem)
 {
     if (newItem == null)
         throw new ArgumentNullException();
     listeners[id] = newItem;
     OnListenerStarted(new ListenerEventArgs {Listener = newItem});
     newItem.Start();
 }