Current section
Files
Jump to
Current section
Files
c_src/quicer_stream.h
/*--------------------------------------------------------------------
Copyright (c) 2021-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-------------------------------------------------------------------*/
#ifndef __QUICER_STREAM_H_
#define __QUICER_STREAM_H_
#include "quicer_config.h"
#include "quicer_ctx.h"
#include "quicer_internal.h"
#include "quicer_nif.h"
#define UNSET_STREAMID 0xFFFFFFFFFFFFFFF
struct QuicerStreamCTX;
typedef enum QUICER_SEND_FLAGS
{
QUICER_SEND_FLAGS_SYNC = 0x1000
} QUICER_SEND_FLAGS;
typedef enum QUICER_STREAM_EVENT_MASKS
{
QUICER_STREAM_EVENT_MASK_START_COMPLETE = 0x00000001
} QUICER_STREAM_EVENT_MASK;
QUIC_STATUS
ServerStreamCallback(HQUIC Stream, void *Context, QUIC_STREAM_EVENT *Event);
ERL_NIF_TERM
async_accept_stream2(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM
async_start_stream2(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM csend4(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM send3(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM recv2(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM
shutdown_stream3(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM
close_stream1(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]);
_IRQL_requires_max_(DISPATCH_LEVEL)
_Function_class_(QUIC_STREAM_CALLBACK) QUIC_STATUS QUIC_API
ClientStreamCallback(_In_ HQUIC Stream,
_In_opt_ void *Context,
_Inout_ QUIC_STREAM_EVENT *Event);
ERL_NIF_TERM
get_stream_rid1(ErlNifEnv *env, int args, const ERL_NIF_TERM argv[]);
#endif // __QUICER_STREAM_H_
ERL_NIF_TERM
get_stream_owner1(ErlNifEnv *env, int args, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM
mock_buffer_sig(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM
flush_stream_buffered_sigs(ErlNifEnv *env,
int argc,
const ERL_NIF_TERM argv[]);
ERL_NIF_TERM
enable_sig_buffer(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]);
typedef struct QuicerStreamCTX QuicerStreamCTX;
BOOLEAN
flush_sig_buffer(ErlNifEnv *env, QuicerStreamCTX *s_ctx);