Create  Edit  Diff  Phillro Industries  Index  Search  Changes  History  Source  RSS  Note  wikifarm  Login

recv.rb

Phi::CommX → recv.rb

http://www.moriq.com/apollo/ext/comm/Phi/CommX.html

http://www.moriq.com/apollo/ext/comm/Phi/recv.rb

require 'phi'
include Phi
require 'comm'

form = Form.new :form1, $0
memo = Memo.new form, :memo1, ''
memo.align = Phi::AL_CLIENT

comm = CommX.new
comm.open

form.on_close = proc do |sender, action|
  print "close action=#{action}\n"
  comm.close
end

comm.on_receive = proc do |sender, size|
  print "recv size=#{size}\n"
  buf = ' ' * size
  comm.receive(buf)
  memo.text += buf
end

form.show
Phi.mainloop
Last modified:2005/04/05 11:17:48
Keyword(s):
References:[Phi::CommX]