예제 #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;
 }