Haka: modules/protocol/tcp/haka/tcp-stream.h Source File

Haka

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

tcp-stream.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 #ifndef HAKA_PROTO_TCP_STREAM_H
6 #define HAKA_PROTO_TCP_STREAM_H
7
8 #include <haka/types.h>
9 #include <haka/container/list2.h>
10 #include <haka/vbuffer_stream.h>
11 #include <haka/tcp.h>
12
16 struct tcp_stream {
17 struct lua_object lua_object;
18 uint32 start_seq;
19 uint64 last_seq;
20 uint64 last_sent_seq;
21 int64 first_offset_seq;
22 uint64 sent_offset_seq;
23 struct list2 current;
24 struct list2 queued;
25 struct list2 sent;
26 struct vbuffer_stream stream;
27 };
28
32 bool tcp_stream_create(struct tcp_stream *stream);
33 void tcp_stream_clear(struct tcp_stream *stream);
34
39 void tcp_stream_init(struct tcp_stream *stream, uint32 seq);
40
47 bool tcp_stream_push(struct tcp_stream *stream, struct tcp *tcp, struct vbuffer_iterator *current);
48
55 struct tcp *tcp_stream_pop(struct tcp_stream *stream);
56
60 void tcp_stream_ack(struct tcp_stream *stream, struct tcp *tcp);
61
65 void tcp_stream_seq(struct tcp_stream *stream, struct tcp *tcp);
66
70 uint32 tcp_stream_lastseq(struct tcp_stream *stream);
71
72 #endif /* HAKA_PROTO_TCP_STREAM_H */
types.h
vbuffer_iterator
Definition: vbuffer.h:77
uint64
unsigned HAKA_64BIT_TYPE uint64
Definition: types.h:30
uint32
unsigned HAKA_32BIT_TYPE uint32
Definition: types.h:29
vbuffer_stream
Definition: vbuffer_stream.h:23
int64
HAKA_64BIT_TYPE int64
Definition: types.h:25
tcp_stream
Definition: tcp-stream.h:16
tcp
Definition: tcp.h:65
vbuffer_stream.h