6 class TestKgioTCPServer < Test::Unit::TestCase
9 @host = ENV["TEST_HOST"] || '127.0.0.1'
10 @srv = Kgio::TCPServer.new(@host, 0)
15 @srv.close unless @srv.closed?
16 Kgio.accept_cloexec = true
17 Kgio.accept_nonblock = false
21 a = TCPSocket.new(@host, @port)
23 assert_kind_of Kgio::Socket, b
24 assert_equal @host, b.kgio_addr
27 def test_accept_nonblock
29 assert_equal nil, @srv.kgio_accept