Created
January 25, 2015 02:40
-
-
Save scionwest/5e80b8a25cc9ecd92341 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void Connect() | |
| { | |
| Thread t = new Thread(DoConnect); | |
| t.IsBackground = true; | |
| t.Start(); | |
| } | |
| private void DoConnect() | |
| { | |
| irc = new TcpClient(_server, _port); | |
| stream = irc.GetStream(); | |
| reader = new StreamReader(stream); | |
| writer = new StreamWriter(stream); | |
| Listen(); | |
| } | |
| private void Listen() | |
| { | |
| while ((inputLine = reader.ReadLine()) != null) | |
| { | |
| writer.WriteLine(message); | |
| writer.Flush(); | |
| Console.Write(inputLine); | |
| }//end while | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment