Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
9bfa71e7
Commit
9bfa71e7
authored
Sep 19, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for DCCP in net_Listen
parent
5971b09a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
src/network/io.c
src/network/io.c
+15
-3
No files found.
src/network/io.c
View file @
9bfa71e7
...
...
@@ -122,11 +122,24 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host,
int
i_port
,
int
protocol
)
{
struct
addrinfo
hints
,
*
res
;
int
socktype
=
SOCK_DGRAM
;
switch
(
protocol
)
{
case
IPPROTO_TCP
:
socktype
=
SOCK_STREAM
;
break
;
case
33
:
/* DCCP */
#ifdef __linux__
socktype
=
6
;
#endif
break
;
}
memset
(
&
hints
,
0
,
sizeof
(
hints
));
/* Since we use port numbers rather than service names, the socket type
* does not really matter. */
hints
.
ai_socktype
=
SOCK_
STRE
AM
;
hints
.
ai_socktype
=
SOCK_
DGR
AM
;
hints
.
ai_flags
=
AI_PASSIVE
;
msg_Dbg
(
p_this
,
"net: listening to %s port %d"
,
psz_host
,
i_port
);
...
...
@@ -144,8 +157,7 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host,
for
(
struct
addrinfo
*
ptr
=
res
;
ptr
!=
NULL
;
ptr
=
ptr
->
ai_next
)
{
int
fd
=
net_Socket
(
p_this
,
ptr
->
ai_family
,
ptr
->
ai_socktype
,
protocol
);
int
fd
=
net_Socket
(
p_this
,
ptr
->
ai_family
,
socktype
,
protocol
);
if
(
fd
==
-
1
)
{
msg_Dbg
(
p_this
,
"socket error: %m"
);
...
...
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