Skip to content

Commit 4981cae

Browse files
committed
expose stream multi receive option
1 parent 2d4d545 commit 4981cae

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

pkg/quic/c/msquic.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ struct QUICConfig {
4545
int EnableDatagramReceive;
4646
int DisableSendBuffering;
4747
int MaxBytesPerKey;
48+
char EnableMultiStream;
4849
};
4950

5051
int64_t
@@ -410,6 +411,11 @@ LoadListenConfiguration(
410411
Settings.IsSet.MaxBytesPerKey = TRUE;
411412
}
412413

414+
if (cfg.EnableMultiStream != 0) {
415+
Settings.StreamMultiReceiveEnabled = TRUE;
416+
Settings.IsSet.StreamMultiReceiveEnabled = TRUE;
417+
}
418+
413419
QUIC_CREDENTIAL_CONFIG_HELPER config = {0};
414420
config.CredConfig.Flags = QUIC_CREDENTIAL_FLAG_NONE;
415421

pkg/quic/connection.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ type Config struct {
3939
TracePerfCounts func([]string, []uint64)
4040
TracePerfCountReport time.Duration
4141
//FailOnOpenStream bool // deprecated in favor of DisableFailOnOpenStream
42-
DisableFailOnOpenStream bool
43-
EnableDatagramReceive bool
44-
DisableSendBuffering bool // Do not allocate & copy sent buffers
45-
MaxBytesPerKey int64
46-
EnableAppBuffering bool // This flags is global across all listeners & dialers
42+
DisableFailOnOpenStream bool
43+
EnableDatagramReceive bool
44+
DisableSendBuffering bool // Do not allocate & copy sent buffers
45+
MaxBytesPerKey int64
46+
EnableAppBuffering bool // This flags is global across all listeners & dialers
47+
EnableStreamMultiReceive bool
4748
}
4849

4950
type ConnState struct {

pkg/quic/listener.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ type MsQuicListener struct {
1919
failOnOpenStream bool
2020
noAllocStream bool
2121
appBuffers bool
22+
multiReceives bool
2223
}
2324

2425
func newMsQuicListener(c C.HQUIC, config C.HQUIC, key, cert, alpn *C.char, failOnOpenStream, noAlloc, appBuffers bool) MsQuicListener {

pkg/quic/wrapper.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ func ListenAddr(addr string, cfg Config) (MsQuicListener, error) {
144144
EnableDatagramReceive: enableDatagram,
145145
DisableSendBuffering: disableSendBuffering,
146146
MaxBytesPerKey: C.int(cfg.MaxBytesPerKey),
147+
EnableMultiStream: C.char(cfg.EnableStreamMultiReceive),
147148
})
148149

149150
if config == nil {

0 commit comments

Comments
 (0)