Skip to content

Commit 4aae668

Browse files
committed
added more ruby like way to change a config object
1 parent 8d1c36f commit 4aae668

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ config = Tls::Config.new # see https://github.com/Asmod4n/mruby-tls/blob/master/
4242
client = Tls::Client.new config
4343
```
4444

45+
You can later on change the configuration object
46+
```ruby
47+
client.config = config
48+
```
49+
4550
Server example
4651
```sh
4752
openssl ecparam -name secp256r1 -genkey -out private-key.pem

mrblib/context.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ class Context
33
attr_reader :config
44
alias :recv :read
55
alias :send :write
6+
alias :config= :configure
67

78
def self.new(config = nil)
89
case config

0 commit comments

Comments
 (0)