ããã«ã¡ã¯ããéããªãã®ã§ãã¾ã¨ãã«å¹´ãè¶ããã®ãå¿é ãªãããã¼ã§ãã ã¡ãã£ã¨åã¾ã§ã社å ã®èªæ¸ä¼ã§Working With TCP Socketsã¨ããæ¬ãèªãã§ãã¾ãããRubyã使ã£ã¦TCPSocketã使ã£ãããã°ã©ãã³ã°ã«ã¤ãã¦å¦ã¶ãã¨ãã§ãã楽ããæ¬ãªã®ã§ãããã¡ã¾ã¡ã¾ã¨èªã¿ãªããã¦ãã¾ãã ãã®ä¸ã«ããNon-blocking IOãã¨ããç« ããã£ã¦ããread, write, accept, connectãããã³ããããã³ã°ã«è¡ãã¡ã½ããã«ã¤ãã¦ç´¹ä»ããã¦ãã¾ããä»åã®è¨äºã§ã¯ç¹ã«accept_nonblockã¡ã½ããã«çç®ãã¦ãRubyããããã©ã®ããã«å®è£ ãã¦ããã®ã追ã£ã¦ã¿ã¾ãã acceptãç¨ããããã°ã©ã TCPServer#acceptãç¨ãããæ¥ç¶ã確ç«ããã¾ã§ãããã¯ããã require 'socket' server = TCPServer.new
{{#tags}}- {{label}}
{{/tags}}