RecThread.cs 662 B

12345678910111213141516171819202122232425262728293031
  1. using AggregatorFinal.DataAggregator;
  2. using AggregatorFinal.Rec;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading;
  8. using System.Threading.Tasks;
  9. namespace AggregatorFinal
  10. {
  11. class RecThread
  12. {
  13. Thread _thread;
  14. String filename;
  15. int port;
  16. public RecThread(String filename, int port)
  17. {
  18. this.filename = filename;
  19. this.port = port;
  20. _thread = new Thread(threadFunction);
  21. _thread.Start();
  22. }
  23. private void threadFunction()
  24. {
  25. Server.startLis(port, filename);
  26. }
  27. }
  28. }