<title>curl_multi_assign man page</title>
<meta name="generator" content="roffit">
<STYLE type="text/css">
-P.level0 {
+pre {
+ overflow: auto;
+ margin: 0;
+}
+
+P.level0, pre.level0 {
padding-left: 2em;
}
-P.level1 {
+P.level1, pre.level1 {
padding-left: 4em;
}
-P.level2 {
+P.level2, pre.level2 {
padding-left: 6em;
}
<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
<p class="level0">curl_multi_assign - set data to associate with an internal socket <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include <curl/curl.h>
+<p class="level0">#include <curl/curl.h>
<p class="level0">CURLMcode curl_multi_assign(CURLM *multi_handle, curl_socket_t sockfd, void *sockptr); <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
<p class="level0">This function creates an association in the multi handle between the given socket and a private pointer of the application. This is designed for <a Class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action</a> uses.
<p class="level0">When set, the <span Class="emphasis">sockptr</span> pointer will be passed to all future socket callbacks for the specific <span Class="emphasis">sockfd</span> socket.
<p class="level0">In a typical application you allocate a struct or at least use some kind of semi-dynamic data for each socket that we must wait for action on when using the <a Class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action</a> approach.
<p class="level0">When our socket-callback gets called by libcurl and we get to know about yet another socket to wait for, we can use <a Class="emphasis" href="./curl_multi_assign.html">curl_multi_assign</a> to point out the particular data so that when we get updates about this same socket again, we don't have to find the struct associated with this socket by ourselves. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
<p class="level0">This function was added in libcurl 7.15.5. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a Class="manpage" href="./curl_multi_setopt.html">curl_multi_setopt</a>, <a Class="manpage" href="./curl_multi_socket_action.html">curl_multi_socket_action</a>, <p class="roffit">
+<p class="level0"><a Class="manpage" href="./curl_multi_setopt.html">curl_multi_setopt</a>, <a Class="manpage" href="./curl_multi_socket_action.html">curl_multi_socket_action</a><p class="roffit">
This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
</body></html>