safari: it works over ws!

This commit is contained in:
Omar Rizwan 2021-02-08 04:16:30 -08:00
parent 4fdcf4be9d
commit b19f68cc8e
2 changed files with 4 additions and 0 deletions

View file

@ -71,13 +71,17 @@ class TabFSService: NSObject, TabFSServiceProtocol {
conn.receiveMessage { (resp, context, isComplete, err) in conn.receiveMessage { (resp, context, isComplete, err) in
guard let resp = resp else { guard let resp = resp else {
// FIXME err // FIXME err
os_log(.default, "resp error: %{public}@", err!.debugDescription as CVarArg)
return return
} }
os_log(.default, "resp %{public}@", String(data: resp, encoding: .utf8) as! CVarArg)
self.fsInput.write(withUnsafeBytes(of: UInt32(resp.count)) { Data($0) }) self.fsInput.write(withUnsafeBytes(of: UInt32(resp.count)) { Data($0) })
self.fsInput.write(resp) self.fsInput.write(resp)
read() read()
} }
} }
read()
} }
// split new thread // split new thread