File: test_unix_server.rb

package info (click to toggle)
ruby-kgio 2.11.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 504 kB
  • sloc: ruby: 2,779; ansic: 2,017; sh: 32; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 412 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'tempfile'
require 'tmpdir'
require './test/lib_server_accept'

class TestKgioUNIXServer < Test::Unit::TestCase

  def setup
    @tmpdir = Dir.mktmpdir('kgio_unix_2')
    tmp = Tempfile.new('kgio_unix_2', @tmpdir)
    @path = tmp.path
    tmp.close!
    @srv = Kgio::UNIXServer.new(@path)
    @host = '127.0.0.1'
  end

  def client_connect
    UNIXSocket.new(@path)
  end

  include LibServerAccept
end