mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
write to channel works!!!!!!!!!!!!!!!!!
removing the read funciton call fixed it
This commit is contained in:
@@ -88,6 +88,7 @@ class SSHHandler: ObservableObject {
|
||||
withAnimation { connected = false }
|
||||
withAnimation { testSuceeded = nil }
|
||||
session = nil
|
||||
terminal = ""
|
||||
// host.key = nil
|
||||
}
|
||||
|
||||
@@ -336,7 +337,7 @@ class SSHHandler: ObservableObject {
|
||||
var nwritten: Int
|
||||
|
||||
// readFromChannel()
|
||||
nbytes = Int(read(0, &buffer, buffer.count))
|
||||
// nbytes = Int(read(0, &buffer, buffer.count))
|
||||
nbytes = buffer.count
|
||||
guard nbytes > 0 else {
|
||||
return
|
||||
|
||||
@@ -28,8 +28,8 @@ struct TextViewController: UIViewRepresentable {
|
||||
}
|
||||
|
||||
private func setTextViewState(on textView: TextView) {
|
||||
let text = self.text
|
||||
DispatchQueue.global(qos: .userInitiated).async {
|
||||
let text = self.text
|
||||
let state = TextViewState(text: text, language: .bash)
|
||||
DispatchQueue.main.async {
|
||||
textView.setState(state)
|
||||
|
||||
Reference in New Issue
Block a user