Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
9889e17c
Commit
9889e17c
authored
Dec 18, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
https: revector HTTP/2 connection test
parent
b00564d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
34 deletions
+8
-34
modules/access/http/Makefile.am
modules/access/http/Makefile.am
+2
-7
modules/access/http/h2conn_test.c
modules/access/http/h2conn_test.c
+6
-27
No files found.
modules/access/http/Makefile.am
View file @
9889e17c
...
@@ -30,13 +30,8 @@ h2frame_test_SOURCES = access/http/h2frame_test.c \
...
@@ -30,13 +30,8 @@ h2frame_test_SOURCES = access/http/h2frame_test.c \
access/http/h2frame.c access/http/h2frame.h
access/http/h2frame.c access/http/h2frame.h
h2output_test_SOURCES
=
access/http/h2output_test.c
h2output_test_SOURCES
=
access/http/h2output_test.c
h2output_test_LDADD
=
libvlc_http.la
$(LIBPTHREAD)
h2output_test_LDADD
=
libvlc_http.la
$(LIBPTHREAD)
h2conn_test_SOURCES
=
access/http/h2conn_test.c
\
h2conn_test_SOURCES
=
access/http/h2conn_test.c
access/http/message.c access/http/message.h
\
h2conn_test_LDADD
=
libvlc_http.la
$(LIBPTHREAD)
access/http/hpack.c access/http/hpack.h access/http/hpackenc.c
\
access/http/h2frame.c access/http/h2frame.h
\
access/http/h2conn.c access/http/h2conn.h
\
access/http/h2output.c access/http/h2output.h
h2conn_test_LDADD
=
$(LIBPTHREAD)
http_msg_test_SOURCES
=
access/http/message_test.c
\
http_msg_test_SOURCES
=
access/http/message_test.c
\
access/http/message.c access/http/message.h
access/http/message.c access/http/message.h
http_file_test_SOURCES
=
access/http/file_test.c
\
http_file_test_SOURCES
=
access/http/file_test.c
\
...
...
modules/access/http/h2conn_test.c
View file @
9889e17c
...
@@ -42,31 +42,6 @@
...
@@ -42,31 +42,6 @@
#include "message.h"
#include "message.h"
#include "transport.h"
#include "transport.h"
/* I/O callbacks */
static
int
internal_fd
=
-
1
;
static
vlc_tls_t
fake_tls
;
ssize_t
vlc_https_send
(
struct
vlc_tls
*
tls
,
const
void
*
buf
,
size_t
len
)
{
assert
(
tls
==
&
fake_tls
);
(
void
)
buf
;
return
len
;
}
ssize_t
vlc_https_recv
(
struct
vlc_tls
*
tls
,
void
*
buf
,
size_t
size
)
{
assert
(
tls
==
&
fake_tls
);
return
read
(
internal_fd
,
buf
,
size
);
}
void
vlc_https_disconnect
(
struct
vlc_tls
*
tls
)
{
assert
(
tls
==
&
fake_tls
);
if
(
close
(
internal_fd
))
assert
(
!
"close"
);
}
static
struct
vlc_h2_conn
*
conn
;
static
struct
vlc_h2_conn
*
conn
;
static
int
external_fd
;
static
int
external_fd
;
...
@@ -87,10 +62,12 @@ static void conn_create(void)
...
@@ -87,10 +62,12 @@ static void conn_create(void)
if
(
socketpair
(
PF_LOCAL
,
SOCK_STREAM
|
SOCK_CLOEXEC
,
0
,
fds
))
if
(
socketpair
(
PF_LOCAL
,
SOCK_STREAM
|
SOCK_CLOEXEC
,
0
,
fds
))
assert
(
!
"socketpair"
);
assert
(
!
"socketpair"
);
struct
vlc_tls
*
tls
=
vlc_tls_DummyCreate
(
NULL
,
fds
[
1
]);
assert
(
tls
!=
NULL
);
external_fd
=
fds
[
0
];
external_fd
=
fds
[
0
];
internal_fd
=
fds
[
1
];
conn
=
vlc_h2_conn_create
(
&
fake_
tls
);
conn
=
vlc_h2_conn_create
(
tls
);
assert
(
conn
!=
NULL
);
assert
(
conn
!=
NULL
);
conn_send
(
vlc_h2_frame_settings
());
conn_send
(
vlc_h2_frame_settings
());
}
}
...
@@ -137,6 +114,8 @@ static void stream_data(uint_fast32_t id, const char *str, bool eos)
...
@@ -137,6 +114,8 @@ static void stream_data(uint_fast32_t id, const char *str, bool eos)
conn_send
(
vlc_h2_frame_data
(
id
,
str
,
strlen
(
str
),
eos
));
conn_send
(
vlc_h2_frame_data
(
id
,
str
,
strlen
(
str
),
eos
));
}
}
/* TODO: check messages coming from the connection under test */
int
main
(
void
)
int
main
(
void
)
{
{
struct
vlc_http_stream
*
s
,
*
s2
;
struct
vlc_http_stream
*
s
,
*
s2
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment