Try support streaming processing in Source and StreamFunction #268
Answered
by
wujunzhuo
fanweixiao
asked this question in
Ideas
-
In that way, we can write code like this: // User's http request connection
var client net.Conn
// yomo-source
var source Yomo.Source
// yomo-sfn
var sfn Yomo.StreamFunction
iocopy := func(src, dest net.Conn) {
defer src.Close()
defer dest.Close()
io.Copy(src, dest)
}
// pipe response
go iocopy(client, sfn)
// pipe request
go iocopy(source, client) |
Beta Was this translation helpful? Give feedback.
Answered by
wujunzhuo
Jan 11, 2022
Replies: 2 comments 1 reply
-
Example yomo/example/1-pipeline/source/pipe.go Lines 43 to 59 in 6f527f9 This can be done by |
Beta Was this translation helpful? Give feedback.
0 replies
-
Consider using multiple streams and adding an abstract concept |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
fanweixiao
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider using multiple streams and adding an abstract concept
Session
to manage them: