예제 #1
0
        private int OnTunBuilderEstablishImpl()
        {
            ParcelFileDescriptor fileDescriptor = ActiveContext.Establish();

            if (fileDescriptor == null)
            {
                throw new Exception("VPNService.Builder.Establish failed");
            }

            Service.HandleThreadStarted();

            return(fileDescriptor.DetachFd());
        }
예제 #2
0
        public bool StartRtcEventLog(string file, int fileSizeLimitBytes)
        {
            try
            {
                ParcelFileDescriptor rtcEventLog = ParcelFileDescriptor.Open(new File(file),
                                                                             ParcelFileMode.Create | ParcelFileMode.Truncate | ParcelFileMode.ReadWrite);

                return(_peerConnection.StartRtcEventLog(rtcEventLog.DetachFd(), fileSizeLimitBytes));
            }
            catch (IOException ex)
            {
                return(false);
            }
        }
        public bool StartAecDump(string file, int fileSizeLimitBytes)
        {
            try
            {
                ParcelFileDescriptor aecDumpFileDescriptor = ParcelFileDescriptor.Open(new File(file),
                                                                                       ParcelFileMode.Create | ParcelFileMode.Truncate | ParcelFileMode.ReadWrite);

                return(_factory.StartAecDump(aecDumpFileDescriptor.DetachFd(), fileSizeLimitBytes));
            }
            catch (IOException ex)
            {
                return(false);
            }
        }
예제 #4
0
        public bool StartAecDumpWithFilePath(string filePath, long maxSizeInBytes)
        {
            try
            {
                ParcelFileDescriptor aecDumpFileDescriptor = ParcelFileDescriptor.Open(new File(filePath),
                                                                                       ParcelFileMode.Create | ParcelFileMode.Truncate | ParcelFileMode.ReadWrite);

                return(_peerConnectionfactory.StartAecDump(aecDumpFileDescriptor.DetachFd(), (int)maxSizeInBytes));
            }
            catch (Exception exception)
            {
                Log.Error(TAG, $"An Exception has occured :  {exception.Message}");
                return(false);
            }
        }
예제 #5
0
        public bool StartRtcEventLogWithFilePath(string filePath, long maxSizeInBytes)
        {
            try
            {
                ParcelFileDescriptor rtcEventLog = ParcelFileDescriptor.Open(new File(filePath),
                                                                             ParcelFileMode.Create | ParcelFileMode.Truncate | ParcelFileMode.ReadWrite);

                return(_peerConnection.StartRtcEventLog(rtcEventLog.DetachFd(), (int)maxSizeInBytes));
            }
            catch (System.Exception exception)
            {
                Log.Error("PlatformPeerConnection", $"Could not Start RTCEvent logging {exception.Message}");
                return(false);
            }
        }