Module: Readapt::Server

Defined in:
lib/readapt/server.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.target_inObject

Returns the value of attribute target_in.



7
8
9
# File 'lib/readapt/server.rb', line 7

def target_in
  @target_in
end

.target_pidObject

Returns the value of attribute target_pid.



8
9
10
# File 'lib/readapt/server.rb', line 8

def target_pid
  @target_pid
end

Instance Method Details

#openingObject



11
12
13
14
# File 'lib/readapt/server.rb', line 11

def opening
  Error.adapter = self
  Output.adapter = self
end

#receiving(data) ⇒ Object



16
17
18
19
20
# File 'lib/readapt/server.rb', line 16

def receiving data
  Server.target_in.syswrite data
rescue Errno::EPIPE, IOError
  close
end