public BitTunnelServerProtocol(BitTunnelServerProtocolFactory parent)
            : base()
        {
            _parent = parent;

            _files = new FileDescriptorLookup();

            SetupHandlers();
        }
예제 #2
0
        public ClientInstance(AppSettings settings, string instanceName)
            : base(settings, instanceName, ConnectionType.Client)
        {
            _networkFiles = new FileDescriptorLookup(true);
            _localFiles = new FileDescriptorLookup(false);

            ClientService.FullFileListReceived += new EventHandler<FileListEventArgs>(Service_FullFileListReceived);
            ClientService.FileListModificationsReceived += new EventHandler<FileListModificationEventArgs>(Service_FileListModificationsReceived);
            ClientService.FileRequestReceived += new EventHandler<FileRequestEventArgs>(Service_FileRequestReceived);
            ClientService.FileRequestResponseReceived += new EventHandler<FileRequestResponseEventArgs>(Service_FileRequestResponseReceived);

            ClientService.FileTransferInitiated += new EventHandler<FileTransferEventArgs>(ClientService_FileTransferInitiated);
            ClientService.FileTransferCompleted += new EventHandler<FileTransferCompletedEventArgs>(ClientService_FileTransferCompleted);
            ClientService.FileTransferProgressed += new EventHandler<FileTransferEventArgs>(ClientService_FileTransferProgressed);
        }
예제 #3
0
        void Service_FullFileListReceived(object sender, FileListEventArgs e)
        {
            _networkFiles = new FileDescriptorLookup(e.FileList, true);

            if (FullFileListReceived != null)
            {
                FullFileListReceived(sender, e);
            }
        }