Пример #1
0
        static private void Accept(object main)
        {
            ServerMainWindow mainWindow = (ServerMainWindow)main;

            while (accept)
            {
                try
                {
                    User newUser = new User(mainWindow);
                    newUser.connection(server.Accept(), folderPath);
                }
                catch
                {
                    if (terminating)
                    {
                        accept = false;
                    }
                    else
                    {
                        Console.Write("Listening socket has stopped working...\n");
                    }
                }
            }
        }
Пример #2
0
 public User(ServerMainWindow caller)
 {
     mainWindow = caller;
 }