示例#1
0
 private void Client_NewConnection(object sender, InternetFramework.Events.InternetConnectionEventArgs e)
 {
     if (grpConsole.InvokeRequired)
     {
         grpConsole.BeginInvoke(new MethodInvoker(delegate() { Client_NewConnection(sender, e); }));
     }
     else
     {
         txtConsole.Text = "Connected to " + e.Remote.ToString() + "\r\n\r\n";
         SetConnected(true);
     }
 }
示例#2
0
 private void Client_RemoteDisconnected(object sender, InternetFramework.Events.InternetConnectionEventArgs e)
 {
     if (grpConsole.InvokeRequired)
     {
         grpConsole.BeginInvoke(new MethodInvoker(delegate() { Client_RemoteDisconnected(sender, e); }));
     }
     else
     {
         txtConsole.Text += "Remote Disconnected.";
         SetConnected(false);
         Client = null;
     }
 }
示例#3
0
 private void Server_RemoteDisconnected(object sender, InternetFramework.Events.InternetConnectionEventArgs e)
 {
     AddLog("Client " + e.Remote + " Disconnected");
     RemoveClient(e.Remote);
 }
示例#4
0
 private void Server_NewConnection(object sender, InternetFramework.Events.InternetConnectionEventArgs e)
 {
     AddLog("Client " + e.Remote + " Connected");
     AddClient(e.Remote);
     Server.SendLine(e.Remote, "Welcome to Windows Telnet Server, a test program for the .NET Standard 2.0 InternetFramework");
 }
示例#5
0
 private void Server_RemoteDisconnecting(object sender, InternetFramework.Events.InternetConnectionEventArgs e)
 {
     Server.SendLine(e.Remote, "Goodbye!");
 }