[vlc-commits] tcp: move documentation to header file

Rémi Denis-Courmont git at videolan.org
Sun Nov 11 16:33:20 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Nov  9 22:44:16 2018 +0200| [ef69b1c2c7958c97fbe812aff2963fc96cca2ba7] | committer: Rémi Denis-Courmont

tcp: move documentation to header file

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ef69b1c2c7958c97fbe812aff2963fc96cca2ba7
---

 include/vlc_network.h | 18 +++++++++++++++++-
 src/network/tcp.c     | 11 -----------
 2 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/include/vlc_network.h b/include/vlc_network.h
index a667d62cef..12417eb7d1 100644
--- a/include/vlc_network.h
+++ b/include/vlc_network.h
@@ -137,7 +137,23 @@ static inline int net_ConnectTCP (vlc_object_t *obj, const char *host, int port)
 
 VLC_API int net_AcceptSingle(vlc_object_t *obj, int lfd);
 
-VLC_API int net_Accept( vlc_object_t *, int * );
+/**
+ * Accepts an new connection on a set of listening sockets.
+ *
+ * If there are no pending connections, this function will wait.
+ *
+ * @note If the thread needs to handle events other than incoming connections,
+ * you need to use poll() and net_AcceptSingle() instead.
+ *
+ * @deprecated This function exists for backward compatibility.
+ * Use vlc_accept() or vlc_accept_i11e() in new code.
+ *
+ * @param obj VLC object for logging and object kill signal
+ * @param fds listening socket set
+ * @return -1 on error (may be transient error due to network issues),
+ * a new socket descriptor on success.
+ */
+VLC_API int net_Accept(vlc_object_t *obj, int *fds);
 #define net_Accept(a, b) \
         net_Accept(VLC_OBJECT(a), b)
 
diff --git a/src/network/tcp.c b/src/network/tcp.c
index f289e5c01a..9f4360d245 100644
--- a/src/network/tcp.c
+++ b/src/network/tcp.c
@@ -257,17 +257,6 @@ int net_AcceptSingle (vlc_object_t *obj, int lfd)
 
 
 #undef net_Accept
-/**
- * Accepts an new connection on a set of listening sockets.
- * If there are no pending connections, this function will wait.
- * @note If the thread needs to handle events other than incoming connections,
- * you need to use poll() and net_AcceptSingle() instead.
- *
- * @param p_this VLC object for logging and object kill signal
- * @param pi_fd listening socket set
- * @return -1 on error (may be transient error due to network issues),
- * a new socket descriptor on success.
- */
 int net_Accept (vlc_object_t *p_this, int *pi_fd)
 {
     assert (pi_fd != NULL);



More information about the vlc-commits mailing list