Class: MServerAgent

Inherits:
Object
  • Object
show all
Defined in:
lib/minitcp.rb

Class Method Summary collapse

Class Method Details

.run(port, host, n, &b) ⇒ Object



385
386
387
388
389
390
391
# File 'lib/minitcp.rb', line 385

def self.run(port,host,n,&b)
  me=MClientAgent.new
  MServer.service( port , host ,n) do |so|
	so.extend(SocketMessage)
	me.instance_eval { b.call(so) }		
  end
end