File: test_tcp_server.rb

package info (click to toggle)
ruby-kgio 2.11.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 512 kB
  • sloc: ruby: 2,790; ansic: 2,020; sh: 32; makefile: 4
file content (16 lines) | stat: -rw-r--r-- 303 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require './test/lib_server_accept'

class TestKgioTCPServer < Test::Unit::TestCase

  def setup
    @host = ENV["TEST_HOST"] || '127.0.0.1'
    @srv = Kgio::TCPServer.new(@host, 0)
    @port = @srv.addr[1]
  end

  def client_connect
    TCPSocket.new(@host, @port)
  end

  include LibServerAccept
end