コード例 #1
0
ファイル: Listener.cs プロジェクト: margro/TVServerXBMC
        public void ListenForClients()
        {
            try
            {
                m_clients = new List<TcpClient>();
                m_communicationThreads = new List<Thread>();
                cmdMutex = new Mutex();

                while (!stopme)
                {
                    Console.WriteLine("Waiting for clients...");
                    Log.Debug("TVServerKodi: Waiting for clients...");
                    while (!this.tcpListener.Pending())
                    {
                        Thread.Sleep(30);
                    }

                    // blocks until a client has connected to the server
                    TcpClient client = this.tcpListener.AcceptTcpClient();

                    // Multithreaded version:
                    Console.WriteLine("New Connection! Starting handler thread for client." + client.Client.RemoteEndPoint.ToString());
                    Log.Debug("TVServerKodi: New Connection! Starting handler thread for client." + client.Client.RemoteEndPoint.ToString());
                    //___________________________
                    lock (this)
                    {
                        m_clients.Add(client);
                    }

                    ConnectionHandler handler = new ConnectionHandler(client, cmdMutex, m_clients.Count);
                    ThreadStart thdstHandler = new ThreadStart(handler.HandleConnection);
                    Thread communicationThread = new Thread(thdstHandler);
                    lock (this)
                    {
                        m_communicationThreads.Add(communicationThread);
                    }
                    communicationThread.Start();
                }

                tcpListener.Stop();
            }
            catch (System.Threading.ThreadAbortException)
            {
                //Expected on a shutdown of the TVServer
            }
            catch (Exception e)
            {
                Log.Error("TVServerKodi: Unexpected error in ListenForClients(): " + e.ToString());
                Console.WriteLine(e.ToString());
            }
        }
コード例 #2
0
 public GetSignalQuality(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #3
0
ファイル: ListRecordedTV.cs プロジェクト: margro/TVServerXBMC
 public ListRecordedTV(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #4
0
ファイル: UpdateSchedule.cs プロジェクト: margro/TVServerXBMC
 public UpdateSchedule(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #5
0
 public GetScheduleInfo(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #6
0
ファイル: IsRecording.cs プロジェクト: margro/TVServerXBMC
 public IsRecording(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #7
0
 public GetChannelThumb(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #8
0
 public GetCardSettings(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #9
0
 public GetScheduleCount(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #10
0
ファイル: ListRecordings.cs プロジェクト: margro/TVServerXBMC
 public ListRecordings(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #11
0
 public GetRecordingInfo(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #12
0
ファイル: GetDriveSpace.cs プロジェクト: margro/TVServerXBMC
 public GetDriveSpace(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #13
0
ファイル: GetBackendName.cs プロジェクト: margro/TVServerXBMC
 public GetBackendName(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #14
0
 public SetRecordingTimesWatched(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #15
0
 public GetRecordingCount(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #16
0
ファイル: IsTimeshifting.cs プロジェクト: margro/TVServerXBMC
 public IsTimeshifting(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #17
0
ファイル: ListSchedules.cs プロジェクト: margro/TVServerXBMC
 public ListSchedules(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #18
0
 public GetRecordingStopTime(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #19
0
ファイル: GetTime.cs プロジェクト: margro/TVServerXBMC
 public GetTime(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #20
0
ファイル: GetEPG.cs プロジェクト: margro/TVServerXBMC
 public GetEPG(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #21
0
 public UpdateRecording(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #22
0
ファイル: Test.cs プロジェクト: margro/TVServerXBMC
 public Test(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #23
0
ファイル: AddSchedule.cs プロジェクト: margro/TVServerXBMC
 public AddSchedule(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #24
0
ファイル: ListTVChannels.cs プロジェクト: margro/TVServerXBMC
 public ListTVChannels(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #25
0
ファイル: GetUserName.cs プロジェクト: margro/TVServerXBMC
 public GetUserName(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #26
0
ファイル: GetVersion.cs プロジェクト: margro/TVServerXBMC
 public GetVersion(ConnectionHandler connection)
     : base(connection)
 {
 }
コード例 #27
0
 public GetChannelCount(ConnectionHandler connection)
     : base(connection)
 {
 }