Imported Upstream version 7.50.2
[platform/upstream/curl.git] / docs / libcurl / opts / CURLMOPT_SOCKETFUNCTION.html
index b4860fe..5ec5e38 100644 (file)
@@ -57,7 +57,7 @@ p.roffit {
  
 int socket_callback(CURL *easy,      /* easy handle */
                     curl_socket_t s, /* socket */
-                    int what,        /* see above */
+                    int what,        /* describes the socket */
                     void *userp,     /* private callback pointer */
                     void *socketp);  /* private socket pointer */
  
@@ -65,7 +65,16 @@ CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_SOCKETFUNCTION, socket_callb
 </pre>
 <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
 <p class="level0">Pass a pointer to your callback function, which should match the prototype shown above. 
-<p class="level0">When the <span Class="emphasis">curl_multi_socket_action(3)</span> function runs, it informs the application about updates in the socket (file descriptor) status by doing none, one, or multiple calls to the <span Class="bold">socket_callback</span>. The callback gets status updates with changes since the previous time the callback was called. If the given callback pointer is NULL, no callback will be called. Set the callback's <span Class="bold">userp</span> argument with <a Class="emphasis" href="./CURLMOPT_SOCKETDATA.html">CURLMOPT_SOCKETDATA</a>.  See <span Class="emphasis">curl_multi_socket_action(3)</span> for more details on how the callback is used and should work. <a name="DEFAULT"></a><h2 class="nroffsh">DEFAULT</h2>
+<p class="level0">When the <span Class="emphasis">curl_multi_socket_action(3)</span> function runs, it informs the application about updates in the socket (file descriptor) status by doing none, one, or multiple calls to the <span Class="bold">socket_callback</span>. The callback gets status updates with changes since the previous time the callback was called. If the given callback pointer is NULL, no callback will be called. Set the callback's <span Class="bold">userp</span> argument with <a Class="emphasis" href="./CURLMOPT_SOCKETDATA.html">CURLMOPT_SOCKETDATA</a>.  See <span Class="emphasis">curl_multi_socket_action(3)</span> for more details on how the callback is used and should work. 
+<p class="level0">The <span Class="bold">what</span> parameter informs the callback on the status of the given socket. It can hold one of these values: 
+<p class="level0"><a name="CURLPOLLIN"></a><span class="nroffip">CURL_POLL_IN</span> 
+<p class="level1">Wait for incoming data. For the socket to become readable. 
+<p class="level0"><a name="CURLPOLLOUT"></a><span class="nroffip">CURL_POLL_OUT</span> 
+<p class="level1">Wait for outgoing data. For the socket to become writable. 
+<p class="level0"><a name="CURLPOLLINOUT"></a><span class="nroffip">CURL_POLL_INOUT</span> 
+<p class="level1">Wait for incoming and outgoing data. For the socket to become readable or writable. 
+<p class="level0"><a name="CURLPOLLREMOVE"></a><span class="nroffip">CURL_POLL_REMOVE</span> 
+<p class="level1">The specified socket/file descriptor is no longer used by libcurl. <a name="DEFAULT"></a><h2 class="nroffsh">DEFAULT</h2>
 <p class="level0">NULL (no callback) <a name="PROTOCOLS"></a><h2 class="nroffsh">PROTOCOLS</h2>
 <p class="level0">All <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
 <p class="level0">TODO <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>