Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
test
core
bad_client
tests
connection_prefix.cc
Go to the documentation of this file.
1
/*
2
*
3
* Copyright 2015 gRPC authors.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*/
18
19
#include "
src/core/lib/surface/server.h
"
20
#include "
test/core/bad_client/bad_client.h
"
21
22
static
void
verifier
(
grpc_server
*
server
,
grpc_completion_queue
*
cq
,
23
void
*
/*registered_method*/
) {
24
while
(
grpc_core::Server::FromC
(
server
)->HasOpenConnections()) {
25
GPR_ASSERT
(
grpc_completion_queue_next
(
26
cq
,
grpc_timeout_milliseconds_to_deadline
(20),
nullptr
)
27
.
type
==
GRPC_QUEUE_TIMEOUT
);
28
}
29
}
30
31
int
main
(
int
argc,
char
** argv) {
32
grpc::testing::TestEnvironment
env
(&argc, argv);
33
grpc_init
();
34
35
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"X"
, 0);
36
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PX"
, 0);
37
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRX"
, 0);
38
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRIX"
, 0);
39
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI X"
, 0);
40
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI *X"
, 0);
41
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * X"
, 0);
42
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HX"
, 0);
43
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTX"
, 0);
44
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTX"
, 0);
45
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTPX"
, 0);
46
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTP/X"
, 0);
47
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTP/2X"
, 0);
48
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTP/2.X"
, 0);
49
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTP/2.0X"
, 0);
50
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTP/2.0\rX"
, 0);
51
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTP/2.0\r\nX"
, 0);
52
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTP/2.0\r\n\rX"
, 0);
53
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTP/2.0\r\n\r\nX"
, 0);
54
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTP/2.0\r\n\r\nSX"
, 0);
55
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTP/2.0\r\n\r\nSMX"
, 0);
56
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTP/2.0\r\n\r\nSM\rX"
, 0);
57
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTP/2.0\r\n\r\nSM\r\nX"
,
58
0);
59
GRPC_RUN_BAD_CLIENT_TEST
(
verifier
,
nullptr
,
"PRI * HTTP/2.0\r\n\r\nSM\r\n\rX"
,
60
0);
61
62
grpc_shutdown
();
63
return
0;
64
}
generate.env
env
Definition:
generate.py:37
main
int main(int argc, char **argv)
Definition:
connection_prefix.cc:31
GPR_ASSERT
#define GPR_ASSERT(x)
Definition:
include/grpc/impl/codegen/log.h:94
grpc_timeout_milliseconds_to_deadline
gpr_timespec grpc_timeout_milliseconds_to_deadline(int64_t time_ms)
Definition:
test/core/util/test_config.cc:89
grpc_completion_queue
Definition:
completion_queue.cc:347
grpc_server
struct grpc_server grpc_server
Definition:
grpc_types.h:65
verifier
static void verifier(grpc_server *server, grpc_completion_queue *cq, void *)
Definition:
connection_prefix.cc:22
server
Definition:
examples/python/async_streaming/server.py:1
grpc::testing::TestEnvironment
Definition:
test/core/util/test_config.h:54
grpc_completion_queue_next
GRPCAPI grpc_event grpc_completion_queue_next(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved)
Definition:
completion_queue.cc:1133
server.h
GRPC_RUN_BAD_CLIENT_TEST
#define GRPC_RUN_BAD_CLIENT_TEST(server_validator, client_validator, payload, flags)
Definition:
bad_client.h:71
asyncio_get_stats.type
type
Definition:
asyncio_get_stats.py:37
grpc_init
GRPCAPI void grpc_init(void)
Definition:
init.cc:146
grpc_core::CppImplOf< Server, grpc_server >::FromC
static Server * FromC(grpc_server *c_type)
Definition:
cpp_impl_of.h:30
GRPC_QUEUE_TIMEOUT
@ GRPC_QUEUE_TIMEOUT
Definition:
grpc_types.h:556
grpc_shutdown
GRPCAPI void grpc_shutdown(void)
Definition:
init.cc:209
bad_client.h
cq
static grpc_completion_queue * cq
Definition:
test/core/fling/client.cc:37
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:54