SplitHTTP client: Add xmux (multiplex controller) for H3 & H2 (#3613)

https://github.com/XTLS/Xray-core/pull/3613#issuecomment-2351954957

Closes https://github.com/XTLS/Xray-core/issues/3560#issuecomment-2247495778

---------

Co-authored-by: mmmray <142015632+mmmray@users.noreply.github.com>
This commit is contained in:
ll11l1lIllIl1lllandmmmray authored and GitHub committed 2024-09-16 12:42:01 +00:00
1 parent a931507dd6
commit b1c6471eeb
9 files changed
+475 -64

No files matched your search

@@ -11,6 +11,7 @@ type splitConn struct {
reader io.ReadCloser
remoteAddr net.Addr
localAddr net.Addr
onClose func()
}
func (c *splitConn) Write(b []byte) (int, error) {
@@ -22,6 +23,10 @@ func (c *splitConn) Read(b []byte) (int, error) {
}
func (c *splitConn) Close() error {
if c.onClose != nil {
c.onClose()
}
err := c.writer.Close()
err2 := c.reader.Close()
if err != nil {