Exemple #1
0
 public DBServerWorker(TcpClient s, DBServer srv)
 {
     // TODO: Complete member initialization
     this.loggedInUsername = null;
     this.s   = s;
     this.srv = srv;
     // this.netio = s.GetStream();
 }
 private DBTransferManager(DBServer srv)
 {
     this.azureLink   = srv.getAzureLink();
     this.globalLocks = srv.getLocks();
     pendingUploads   = new Dictionary <string, UPLOAD_INFO>();
     listenSocket     = new TcpListener(IPAddress.Any, DBServer.SERVER_CONTROL_PORT + 1);
     listenSocket.Start();
     new Thread(new ThreadStart(listen)).Start();
     //control returns to DBServerWorker
 }
 public static DBTransferManager getManager(DBServer srv)
 {
     if (instance == null)
     {
         if (srv == null)
         {
             return(null);
         }
         else
         {
             instance = new DBTransferManager(srv);
         }
     }
     return(instance);
 }