src/Connection.cs
/// <summary>
/// Connect Method. Connect to a remote IRC server.
/// </summary>
/// <param name="Host">Hostname or IP of server.</param>
/// <param name="Port">Port on which the server is listening.</param>
Connect Method. Connect to a remote IRC server.
Connect Method . Connect to a remote IRC server .
public void Connect(string Host, int Port)
		{
			if (Host==null||Host.Trim()=="")
				throw(new ArgumentException("Host cannot be empty or null.", "Host"));
			if (Port==0)
				throw(new ArgumentException("Port cannot be 0 or null.", "Port"));
			if (strNickname.Trim()=="")
				throw(new Exception("Nickname not set."));
			if (strIdentity.Trim()=="")
				throw(new Exception("Identity not set"));
			strHost = Host;
			intPort = Port;
			base.CurrentConnection.OnConnected += new EventHandler(onConnected);
			base.CurrentConnection.Connect(Host, Port);
			base.CurrentConnection.OnConnectFailed += new EventHandler(onConnectFailed);
			base.CurrentConnection.OnDisconnected += new EventHandler(onDisconnected);
			base.CurrentConnection.OnDataReceived += new OnDataEventHandler(onData);
			blConnecting = true;
		}
public void Connect ( string Host , int Port ) { if ( Host == null || Host . Trim ( ) == " " ) throw ( new ArgumentException ( " " , " " ) ) ; if ( Port == 0 ) throw ( new ArgumentException ( " " , " " ) ) ; if ( strNickname . Trim ( ) == " " ) throw ( new Exception ( " " ) ) ; if ( strIdentity . Trim ( ) == " " ) throw ( new Exception ( " " ) ) ; strHost = Host ; intPort = Port ; base . CurrentConnection . OnConnected += new EventHandler ( onConnected ) ; base . CurrentConnection . Connect ( Host , Port ) ; base . CurrentConnection . OnConnectFailed += new EventHandler ( onConnectFailed ) ; base . CurrentConnection . OnDisconnected += new EventHandler ( onDisconnected ) ; base . CurrentConnection . OnDataReceived += new OnDataEventHandler ( onData ) ; blConnecting = true ; }
Connect Method.
Connect Method .
Host
string
Hostname or IP of server.
Hostname or IP of server .
Port
int
Port on which the server is listening.
Port on which the server is listening .