reaktivity / k3po-nukleus-ext.java

K3PO Nukleus Extension
Apache License 2.0
0 stars 9 forks source link

Multiple writes with half duplex (maybe other duplexs) require a window inbetween #16

Closed dpwspoon closed 7 years ago

dpwspoon commented 7 years ago

Sending a single window to an accept stream for multiple writes does not result in the second write coming out. I.E.

# window for 8024
write "hello"
write "world"

the world is never written.

The following does work though

# window for 8024
write "hello"
# window for 5
write "world"
dpwspoon commented 7 years ago

Full script


accept await ROUTED_PROXY
        "nukleus://target/streams/http-cache"
        option nukleus:route ${newProxyConnectRef}
        option nukleus:window 8192
        option nukleus:transmission "half-duplex"
accepted

read nukleus:begin.ext ${http:header(":scheme", "http")}
                       ${http:header(":method", "GET")}
                       ${http:header(":path", "/path")}
                       ${http:header(":authority", "localhost:8080")}

connected

read closed

write nukleus:begin.ext ${http:header(":status", "200")}
                        ${http:header("content-length", "11")}
                        ${http:header("date", date)}
write "hello world"

write close

accepted

read nukleus:begin.ext ${http:header(":scheme", "http")}
                       ${http:header(":method", "GET")}
                       ${http:header(":path", "/path")}
                       ${http:header(":authority", "localhost:8080")}

connected

read closed

write nukleus:begin.ext ${http:header(":status", "200")}
                        ${http:header("content-length", "11")}
                        ${http:header("date", date)}
write "hello"
write " world"

write close

accepted

read nukleus:begin.ext ${http:header(":scheme", "http")}
                       ${http:header(":method", "GET")}
                       ${http:header(":path", "/path")}
                       ${http:header(":authority", "localhost:8080")}

connected

read closed

write nukleus:begin.ext ${http:header(":status", "200")}
                        ${http:header("content-length", "11")}
                        ${http:header("date", date)}
write "hello"
write " alien"

write close
dpwspoon commented 7 years ago

Not a bug. The issue was due to window with frame length 1