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
util
test_tcp_server.h
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
#ifndef GRPC_TEST_CORE_UTIL_TEST_TCP_SERVER_H
20
#define GRPC_TEST_CORE_UTIL_TEST_TCP_SERVER_H
21
22
#include <vector>
23
24
#include <
grpc/support/sync.h
>
25
26
#include "
src/core/lib/iomgr/tcp_server.h
"
27
28
// test_tcp_server should be stack-allocated or new'ed, never gpr_malloc'ed
29
// since it contains C++ objects.
30
struct
test_tcp_server
{
31
grpc_tcp_server
*
tcp_server
=
nullptr
;
32
grpc_closure
shutdown_complete
;
33
bool
shutdown
=
false
;
34
// mu is filled in by grpc_pollset_init and controls the pollset.
35
// TODO(unknown): Switch this to a Mutex once pollset_init can provide a Mutex
36
gpr_mu
*
mu
;
37
std::vector<grpc_pollset*>
pollset
;
38
grpc_tcp_server_cb
on_connect
;
39
void
*
cb_data
;
40
};
41
42
void
test_tcp_server_init
(
test_tcp_server
*
server
,
43
grpc_tcp_server_cb
on_connect
,
void
* user_data);
44
void
test_tcp_server_start
(
test_tcp_server
*
server
,
int
port
);
45
void
test_tcp_server_poll
(
test_tcp_server
*
server
,
int
milliseconds);
46
void
test_tcp_server_destroy
(
test_tcp_server
*
server
);
47
48
#endif
/* GRPC_TEST_CORE_UTIL_TEST_TCP_SERVER_H */
test_tcp_server::shutdown
bool shutdown
Definition:
test_tcp_server.h:33
test_tcp_server::pollset
std::vector< grpc_pollset * > pollset
Definition:
test_tcp_server.h:37
grpc_tcp_server
Definition:
tcp_server_utils_posix.h:53
test_tcp_server_init
void test_tcp_server_init(test_tcp_server *server, grpc_tcp_server_cb on_connect, void *user_data)
Definition:
test_tcp_server.cc:43
test_tcp_server
Definition:
test_tcp_server.h:30
grpc_tcp_server_cb
void(* grpc_tcp_server_cb)(void *arg, grpc_endpoint *ep, grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor)
Definition:
tcp_server.h:51
test_tcp_server::tcp_server
grpc_tcp_server * tcp_server
Definition:
test_tcp_server.h:31
test_tcp_server_destroy
void test_tcp_server_destroy(test_tcp_server *server)
Definition:
test_tcp_server.cc:103
test_tcp_server_start
void test_tcp_server_start(test_tcp_server *server, int port)
Definition:
test_tcp_server.cc:57
on_connect
void on_connect(uv_connect_t *req, int status)
Definition:
libuv/docs/code/dns/main.c:32
tests.unit._exit_scenarios.port
port
Definition:
_exit_scenarios.py:179
test_tcp_server::on_connect
grpc_tcp_server_cb on_connect
Definition:
test_tcp_server.h:38
server
Definition:
examples/python/async_streaming/server.py:1
gpr_mu
pthread_mutex_t gpr_mu
Definition:
impl/codegen/sync_posix.h:47
test_tcp_server::mu
gpr_mu * mu
Definition:
test_tcp_server.h:36
test_tcp_server_poll
void test_tcp_server_poll(test_tcp_server *server, int milliseconds)
Definition:
test_tcp_server.cc:87
test_tcp_server::cb_data
void * cb_data
Definition:
test_tcp_server.h:39
test_tcp_server::shutdown_complete
grpc_closure shutdown_complete
Definition:
test_tcp_server.h:32
tcp_server.h
sync.h
grpc_closure
Definition:
closure.h:56
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:33