]> git.sesse.net Git - vlc/blobdiff - src/network/udp.c
UDP-Lite access output
[vlc] / src / network / udp.c
index b8c522ea5b810cd6d9eead35be2c6d81db33a061..bd443f8ec1098cae22b20dbd918dfc746c5df4d8 100644 (file)
@@ -511,13 +511,13 @@ int net_SetDSCP( int fd, uint8_t dscp )
 
 
 /*****************************************************************************
- * __net_ConnectUDP:
+ * __net_ConnectDgram:
  *****************************************************************************
- * Open a UDP socket to send data to a defined destination, with an optional
- * hop limit.
+ * Open a datagram socket to send data to a defined destination, with an
+ * optional hop limit.
  *****************************************************************************/
-int __net_ConnectUDP( vlc_object_t *p_this, const char *psz_host, int i_port,
-                      int i_hlim )
+int __net_ConnectDgram( vlc_object_t *p_this, const char *psz_host, int i_port,
+                        int i_hlim, int proto )
 {
     struct addrinfo hints, *res, *ptr;
     int             i_val, i_handle = -1;
@@ -546,7 +546,7 @@ int __net_ConnectUDP( vlc_object_t *p_this, const char *psz_host, int i_port,
     {
         char *str;
         int fd = net_Socket (p_this, ptr->ai_family, ptr->ai_socktype,
-                             ptr->ai_protocol);
+                             proto ?: ptr->ai_protocol);
         if (fd == -1)
             continue;