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
5a68ec40
Commit
5a68ec40
authored
Jun 30, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: add vlc_accept_i11e() for the sake of completeness
parent
a117a662
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
0 deletions
+35
-0
include/vlc_interrupt.h
include/vlc_interrupt.h
+2
-0
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/misc/interrupt.c
src/misc/interrupt.c
+32
-0
No files found.
include/vlc_interrupt.h
View file @
5a68ec40
...
@@ -103,6 +103,8 @@ ssize_t vlc_send_i11e(int fd, const void *buf, size_t len, int flags)
...
@@ -103,6 +103,8 @@ ssize_t vlc_send_i11e(int fd, const void *buf, size_t len, int flags)
return
vlc_sendto_i11e
(
fd
,
buf
,
len
,
flags
,
NULL
,
0
);
return
vlc_sendto_i11e
(
fd
,
buf
,
len
,
flags
,
NULL
,
0
);
}
}
VLC_API
int
vlc_accept_i11e
(
int
fd
,
struct
sockaddr
*
,
socklen_t
*
,
bool
);
/**
/**
* @}
* @}
* @defgroup interrupt_context Interrupt context signaling and manipulation
* @defgroup interrupt_context Interrupt context signaling and manipulation
...
...
src/libvlccore.sym
View file @
5a68ec40
...
@@ -548,6 +548,7 @@ vlc_recvmsg_i11e
...
@@ -548,6 +548,7 @@ vlc_recvmsg_i11e
vlc_recvfrom_i11e
vlc_recvfrom_i11e
vlc_sendmsg_i11e
vlc_sendmsg_i11e
vlc_sendto_i11e
vlc_sendto_i11e
vlc_accept_i11e
vlc_sem_wait_i11e
vlc_sem_wait_i11e
vlc_interrupt_create
vlc_interrupt_create
vlc_interrupt_destroy
vlc_interrupt_destroy
...
...
src/misc/interrupt.c
View file @
5a68ec40
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_fs.h>
/* vlc_pipe */
#include <vlc_fs.h>
/* vlc_pipe */
#include <vlc_network.h>
/* vlc_accept */
#include "interrupt.h"
#include "interrupt.h"
#include "libvlc.h"
#include "libvlc.h"
...
@@ -489,6 +490,20 @@ ssize_t vlc_sendto_i11e(int fd, const void *buf, size_t len, int flags,
...
@@ -489,6 +490,20 @@ ssize_t vlc_sendto_i11e(int fd, const void *buf, size_t len, int flags,
return
vlc_sendmsg_i11e
(
fd
,
&
msg
,
flags
);
return
vlc_sendmsg_i11e
(
fd
,
&
msg
,
flags
);
}
}
int
vlc_accept_i11e
(
int
fd
,
struct
sockaddr
*
addr
,
socklen_t
*
addrlen
,
bool
blocking
)
{
struct
pollfd
ufd
;
ufd
.
fd
=
fd
;
ufd
.
events
=
POLLIN
;
if
(
vlc_poll_i11e
(
&
ufd
,
1
,
-
1
)
<
0
)
return
-
1
;
return
vlc_accept
(
fd
,
addr
,
addrlen
,
blocking
);
}
#else
/* _WIN32 */
#else
/* _WIN32 */
static
void
CALLBACK
vlc_poll_i11e_wake_self
(
ULONG_PTR
data
)
static
void
CALLBACK
vlc_poll_i11e_wake_self
(
ULONG_PTR
data
)
...
@@ -620,4 +635,21 @@ ssize_t vlc_sendto_i11e(int fd, const void *buf, size_t len, int flags,
...
@@ -620,4 +635,21 @@ ssize_t vlc_sendto_i11e(int fd, const void *buf, size_t len, int flags,
return
ret
;
return
ret
;
}
}
int
vlc_accept_i11e
(
int
fd
,
struct
sockaddr
*
addr
,
socklen_t
*
addrlen
,
bool
blocking
)
{
struct
pollfd
ufd
;
ufd
.
fd
=
fd
;
ufd
.
events
=
POLLIN
;
if
(
vlc_poll_i11e
(
&
ufd
,
1
,
-
1
)
<
0
)
return
-
1
;
int
cfd
=
vlc_accept
(
fd
,
addr
,
addrlen
,
blocking
);
if
(
cfd
<
0
&&
WSAGetLastError
()
==
WSAEWOULDBLOCK
)
errno
=
EAGAIN
;
return
cfd
;
}
#endif
#endif
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