lib/noise/connection.rb in noise-ruby-0.2.0 vs lib/noise/connection.rb in noise-ruby-0.3.0

- old
+ new

@@ -20,11 +20,15 @@ def initialize(name) @protocol = Protocol.create(name) @handshake_started = false @handshake_finished = false @fn = nil - @write_message_proc = ->(payload) { write_message(payload) } - @read_message_proc = ->(payload) { read_message(payload) } + @write_message_proc = lambda {|payload| write_message(payload)} + @read_message_proc = lambda {|payload| read_message(payload)} + end + + def psks=(psks) + @protocol.psks = psks end def prologue=(prologue) @protocol.prologue = prologue end