fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. private static async Task clientWorker(TcpClient client)
  6. {
  7. //クライアントとの何らかの通信処理
  8. await client.ReadAsync();
  9. await client.WriteAsync();
  10. }
  11.  
  12. public static void Main()
  13. {
  14. // your code goes here
  15. var listener=new TcpListener();
  16.  
  17. while(true)
  18. {
  19. var client=listener.Accept();
  20.  
  21. clientWorker(client);
  22. }
  23. }
  24. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(5,23): error CS0246: The type or namespace name `Task' could not be found. Are you missing `System.Threading.Tasks' using directive?
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty