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



373
374
375
376
377
378
379
# File 'lib/minitcp.rb', line 373

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