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
4bcde574
Commit
4bcde574
authored
Oct 22, 2005
by
Marian Durkovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allocate HUGE buffer only for Windows sockets - see last paragraph in:
http://www.itamarst.org/writings/win32sockets.html
parent
9a68a1af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
src/misc/httpd.c
src/misc/httpd.c
+10
-3
No files found.
src/misc/httpd.c
View file @
4bcde574
...
@@ -58,6 +58,13 @@
...
@@ -58,6 +58,13 @@
# endif
# endif
#endif
#endif
#if defined( WIN32 )
/* We need HUGE buffer otherwise TCP throughput is very limited */
#define HTTPD_CL_BUFSIZE 1000000
#else
#define HTTPD_CL_BUFSIZE 10000
#endif
#if 0
#if 0
typedef struct httpd_t httpd_t;
typedef struct httpd_t httpd_t;
...
@@ -854,9 +861,9 @@ static int httpd_StreamCallBack( httpd_callback_sys_t *p_sys,
...
@@ -854,9 +861,9 @@ static int httpd_StreamCallBack( httpd_callback_sys_t *p_sys,
i_pos
=
answer
->
i_body_offset
%
stream
->
i_buffer_size
;
i_pos
=
answer
->
i_body_offset
%
stream
->
i_buffer_size
;
i_write
=
stream
->
i_buffer_pos
-
answer
->
i_body_offset
;
i_write
=
stream
->
i_buffer_pos
-
answer
->
i_body_offset
;
if
(
i_write
>
1000000
)
if
(
i_write
>
HTTPD_CL_BUFSIZE
)
{
{
i_write
=
1000000
;
i_write
=
HTTPD_CL_BUFSIZE
;
}
}
else
if
(
i_write
<=
0
)
else
if
(
i_write
<=
0
)
{
{
...
@@ -1485,7 +1492,7 @@ static void httpd_ClientInit( httpd_client_t *cl )
...
@@ -1485,7 +1492,7 @@ static void httpd_ClientInit( httpd_client_t *cl )
cl
->
i_state
=
HTTPD_CLIENT_RECEIVING
;
cl
->
i_state
=
HTTPD_CLIENT_RECEIVING
;
cl
->
i_activity_date
=
mdate
();
cl
->
i_activity_date
=
mdate
();
cl
->
i_activity_timeout
=
I64C
(
10000000
);
cl
->
i_activity_timeout
=
I64C
(
10000000
);
cl
->
i_buffer_size
=
1000000
;
cl
->
i_buffer_size
=
HTTPD_CL_BUFSIZE
;
cl
->
i_buffer
=
0
;
cl
->
i_buffer
=
0
;
cl
->
p_buffer
=
malloc
(
cl
->
i_buffer_size
);
cl
->
p_buffer
=
malloc
(
cl
->
i_buffer_size
);
cl
->
i_mode
=
HTTPD_CLIENT_FILE
;
cl
->
i_mode
=
HTTPD_CLIENT_FILE
;
...
...
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