/// <summary> /// Initializes a new instance of the <see cref="IcsClient"/> class. /// </summary> /// <param name="server">The server address.</param> /// <param name="port">The server port.</param> /// <param name="prompt">The server prompt.</param> /// <param name="newLine">The server new line.</param> public IcsClient(string server, int port, string prompt, string newLine) { telnet = new TelnetClient(server, port, prompt, newLine); messageReadingTask = new Task(MessageReadingTask, cancellationToken.Token, TaskCreationOptions.LongRunning); MessageSplitter = prompt; ConnectionWorking = true; }
public void TelnetGuestLogin() { TelnetClient client = new TelnetClient("freechess.org", 5000, "fics% "); string welcomeMessage = Wait(client.LoginGuest()); Debug.Assert(!string.IsNullOrEmpty(welcomeMessage)); }