Support configure kcptun mtu.

This commit is contained in:
Charlie Qiu
2017-01-12 15:31:23 +08:00
parent 781031165e
commit fbd5d3b8a2
3 changed files with 103 additions and 61 deletions
@@ -32,6 +32,7 @@ class PreferencesWindowController: NSWindowController
@IBOutlet weak var kcptunNocompCheckBoxBtn: NSButton!
@IBOutlet weak var kcptunDatashardTextField: NSTextField!
@IBOutlet weak var kcptunParityshardTextField: NSTextField!
@IBOutlet weak var kcptunMTUTextField: NSTextField!
@IBOutlet weak var removeButton: NSButton!
let tableViewDragType: String = "ss.server.profile.data"
@@ -244,6 +245,9 @@ class PreferencesWindowController: NSWindowController
kcptunParityshardTextField.bind("value", to: editingProfile, withKeyPath: "kcptunProfile.parityshard"
, options: [NSContinuouslyUpdatesValueBindingOption: true])
kcptunMTUTextField.bind("value", to: editingProfile, withKeyPath: "kcptunProfile.mtu"
, options: [NSContinuouslyUpdatesValueBindingOption: true])
} else {
editingProfile = nil
hostTextField.unbind("value")