Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
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
Hide 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,
...
@@ -122,11 +122,24 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host,
int
i_port
,
int
protocol
)
int
i_port
,
int
protocol
)
{
{
struct
addrinfo
hints
,
*
res
;
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
));
memset
(
&
hints
,
0
,
sizeof
(
hints
));
/* Since we use port numbers rather than service names, the socket type
/* Since we use port numbers rather than service names, the socket type
* does not really matter. */
* does not really matter. */
hints
.
ai_socktype
=
SOCK_
STRE
AM
;
hints
.
ai_socktype
=
SOCK_
DGR
AM
;
hints
.
ai_flags
=
AI_PASSIVE
;
hints
.
ai_flags
=
AI_PASSIVE
;
msg_Dbg
(
p_this
,
"net: listening to %s port %d"
,
psz_host
,
i_port
);
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,
...
@@ -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
)
for
(
struct
addrinfo
*
ptr
=
res
;
ptr
!=
NULL
;
ptr
=
ptr
->
ai_next
)
{
{
int
fd
=
net_Socket
(
p_this
,
ptr
->
ai_family
,
ptr
->
ai_socktype
,
int
fd
=
net_Socket
(
p_this
,
ptr
->
ai_family
,
socktype
,
protocol
);
protocol
);
if
(
fd
==
-
1
)
if
(
fd
==
-
1
)
{
{
msg_Dbg
(
p_this
,
"socket error: %m"
);
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