1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>SoupConnection</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.71.0">
<link rel="start" href="index.html" title="libsoup Reference Manual">
<link rel="up" href="ch02.html" title="libsoup API Reference">
<link rel="prev" href="SoupAuth.html" title="SoupAuth">
<link rel="next" href="SoupConnectionNTLM.html" title="SoupConnectionNTLM">
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="ch01.html" title="libsoup Tutorial">
<link rel="chapter" href="ch02.html" title="libsoup API Reference">
<link rel="chapter" href="ch03.html" title="libsoup internals">
<link rel="index" href="ix01.html" title="Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="SoupAuth.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libsoup Reference Manual</th>
<td><a accesskey="n" href="SoupConnectionNTLM.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id345864" class="shortcut">Top</a>
 | 
<a href="#id375233" class="shortcut">Description</a>
 | 
<a href="#id357311" class="shortcut">Object Hierarchy</a>
 | 
<a href="#id357344" class="shortcut">Properties</a>
 | 
<a href="#id357442" class="shortcut">Signals</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="SoupConnection"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id345864"></a><span class="refentrytitle">SoupConnection</span>
</h2>
<p>SoupConnection — a single possibly-persistent HTTP connection</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
struct <a href="SoupConnection.html#SoupConnection-struct">SoupConnection</a>;
<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a>* <a href="SoupConnection.html#soup-connection-new">soup_connection_new</a> (const char *propname1,
...);
void (<a href="SoupConnection.html#SoupConnectionCallback">*SoupConnectionCallback</a>) (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> status,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
void <a href="SoupConnection.html#soup-connection-connect-async">soup_connection_connect_async</a> (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a href="SoupConnection.html#SoupConnectionCallback">SoupConnectionCallback</a> callback,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <a href="SoupConnection.html#soup-connection-connect-sync">soup_connection_connect_sync</a> (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn);
void <a href="SoupConnection.html#soup-connection-disconnect">soup_connection_disconnect</a> (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="SoupConnection.html#soup-connection-is-in-use">soup_connection_is_in_use</a> (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn);
time_t <a href="SoupConnection.html#soup-connection-last-used">soup_connection_last_used</a> (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn);
void <a href="SoupConnection.html#soup-connection-send-request">soup_connection_send_request</a> (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a href="SoupMessage.html" title="SoupMessage">SoupMessage</a> *req);
void <a href="SoupConnection.html#soup-connection-authenticate">soup_connection_authenticate</a> (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a href="SoupMessage.html" title="SoupMessage">SoupMessage</a> *msg,
const char *auth_type,
const char *auth_realm,
char **username,
char **password);
void <a href="SoupConnection.html#soup-connection-reauthenticate">soup_connection_reauthenticate</a> (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a href="SoupMessage.html" title="SoupMessage">SoupMessage</a> *msg,
const char *auth_type,
const char *auth_realm,
char **username,
char **password);
void <a href="SoupConnection.html#soup-connection-release">soup_connection_release</a> (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn);
void <a href="SoupConnection.html#soup-connection-reserve">soup_connection_reserve</a> (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn);
#define <a href="SoupConnection.html#SOUP-CONNECTION-ORIGIN-URI:CAPS">SOUP_CONNECTION_ORIGIN_URI</a>
#define <a href="SoupConnection.html#SOUP-CONNECTION-PROXY-URI:CAPS">SOUP_CONNECTION_PROXY_URI</a>
#define <a href="SoupConnection.html#SOUP-CONNECTION-SSL-CREDENTIALS:CAPS">SOUP_CONNECTION_SSL_CREDENTIALS</a>
#define <a href="SoupConnection.html#SOUP-CONNECTION-MESSAGE-FILTER:CAPS">SOUP_CONNECTION_MESSAGE_FILTER</a>
#define <a href="SoupConnection.html#SOUP-CONNECTION-ASYNC-CONTEXT:CAPS">SOUP_CONNECTION_ASYNC_CONTEXT</a>
#define <a href="SoupConnection.html#SOUP-CONNECTION-TIMEOUT:CAPS">SOUP_CONNECTION_TIMEOUT</a>
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id357311"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
+----SoupConnection
+----<a href="SoupConnectionNTLM.html" title="SoupConnectionNTLM">SoupConnectionNTLM</a>
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id357344"></a><h2>Properties</h2>
<pre class="synopsis">
"<a href="SoupConnection.html#SoupConnection--async-context">async-context</a>" <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> : Read / Write / Construct Only
"<a href="SoupConnection.html#SoupConnection--message-filter">message-filter</a>" <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> : Read / Write
"<a href="SoupConnection.html#SoupConnection--origin-uri">origin-uri</a>" <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> : Read / Write / Construct Only
"<a href="SoupConnection.html#SoupConnection--proxy-uri">proxy-uri</a>" <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> : Read / Write / Construct Only
"<a href="SoupConnection.html#SoupConnection--ssl-creds">ssl-creds</a>" <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> : Read / Write / Construct Only
"<a href="SoupConnection.html#SoupConnection--timeout">timeout</a>" <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> : Read / Write
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id357442"></a><h2>Signals</h2>
<pre class="synopsis">
"<a href="SoupConnection.html#SoupConnection-authenticate">authenticate</a>"
void user_function (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a href="SoupMessage.html" title="SoupMessage">SoupMessage</a> *msg,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *auth_type,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *auth_realm,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> username,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> password,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run first
"<a href="SoupConnection.html#SoupConnection-connect-result">connect-result</a>"
void user_function (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> status,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run first
"<a href="SoupConnection.html#SoupConnection-disconnected">disconnected</a>"
void user_function (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run first
"<a href="SoupConnection.html#SoupConnection-reauthenticate">reauthenticate</a>"
void user_function (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a href="SoupMessage.html" title="SoupMessage">SoupMessage</a> *msg,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *auth_type,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *auth_realm,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> username,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> password,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run first
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id375233"></a><h2>Description</h2>
<p>
<a href="SoupConnection.html" title="SoupConnection"><span class="type">SoupConnection</span></a> represents a single connection to an HTTP server
(possibly via a proxy). Connection objects are created and destroyed
automatically by <a href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a>.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id375267"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id375278"></a><h3>
<a name="SoupConnection-struct"></a>struct SoupConnection</h3>
<a class="indexterm" name="id375291"></a><pre class="programlisting">struct SoupConnection;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id375308"></a><h3>
<a name="soup-connection-new"></a>soup_connection_new ()</h3>
<a class="indexterm" name="id375321"></a><pre class="programlisting"><a href="SoupConnection.html" title="SoupConnection">SoupConnection</a>* soup_connection_new (const char *propname1,
...);</pre>
<p>
Creates an HTTP connection. You must set at least one of
<a href="SoupConnection.html#SOUP-CONNECTION-ORIGIN-URI:CAPS"><code class="literal">SOUP_CONNECTION_ORIGIN_URI</code></a> or <a href="SoupConnection.html#SOUP-CONNECTION-PROXY-URI:CAPS"><code class="literal">SOUP_CONNECTION_PROXY_URI</code></a>. If you
set an origin server URI but no proxy URI, this will be a direct
connection. If you set a proxy URI and an https origin server URI,
this will be a tunnel. Otherwise it will be an http proxy
connection.
</p>
<p>
You must call <a href="SoupConnection.html#soup-connection-connect-async"><code class="function">soup_connection_connect_async()</code></a> or
<a href="SoupConnection.html#soup-connection-connect-sync"><code class="function">soup_connection_connect_sync()</code></a> to connect it after creating it.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>propname1</code></em> :</span></td>
<td> name of first property to set
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>...</code></em> :</span></td>
<td> value of <em class="parameter"><code>propname1</code></em>, followed by additional property/value pairs
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the new connection (not yet ready for use).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id375457"></a><h3>
<a name="SoupConnectionCallback"></a>SoupConnectionCallback ()</h3>
<a class="indexterm" name="id375470"></a><pre class="programlisting">void (*SoupConnectionCallback) (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> status,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre>
<p>
The callback function passed to <a href="SoupConnection.html#soup-connection-connect-async"><code class="function">soup_connection_connect_async()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> the <a href="SoupConnection.html" title="SoupConnection"><span class="type">SoupConnection</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>status</code></em> :</span></td>
<td> an HTTP status code indicating success or failure
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td> the data passed to <a href="SoupConnection.html#soup-connection-connect-async"><code class="function">soup_connection_connect_async()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id375596"></a><h3>
<a name="soup-connection-connect-async"></a>soup_connection_connect_async ()</h3>
<a class="indexterm" name="id375609"></a><pre class="programlisting">void soup_connection_connect_async (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a href="SoupConnection.html#SoupConnectionCallback">SoupConnectionCallback</a> callback,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);</pre>
<p>
Asynchronously connects <em class="parameter"><code>conn</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> the connection
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>callback</code></em> :</span></td>
<td> callback to call when the connection succeeds or fails
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td> data for <em class="parameter"><code>callback</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id375721"></a><h3>
<a name="soup-connection-connect-sync"></a>soup_connection_connect_sync ()</h3>
<a class="indexterm" name="id375734"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> soup_connection_connect_sync (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn);</pre>
<p>
Synchronously connects <em class="parameter"><code>conn</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> the connection
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the soup status
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id375806"></a><h3>
<a name="soup-connection-disconnect"></a>soup_connection_disconnect ()</h3>
<a class="indexterm" name="id375820"></a><pre class="programlisting">void soup_connection_disconnect (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn);</pre>
<p>
Disconnects <em class="parameter"><code>conn</code></em>'s socket and emits a <code class="literal">disconnected</code> signal.
After calling this, <em class="parameter"><code>conn</code></em> will be essentially useless.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> a connection
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id375896"></a><h3>
<a name="soup-connection-is-in-use"></a>soup_connection_is_in_use ()</h3>
<a class="indexterm" name="id375910"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> soup_connection_is_in_use (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn);</pre>
<p>
Tests whether or not <em class="parameter"><code>conn</code></em> is in use.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> a connection
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if there is currently a request being processed
on <em class="parameter"><code>conn</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id375998"></a><h3>
<a name="soup-connection-last-used"></a>soup_connection_last_used ()</h3>
<a class="indexterm" name="id376012"></a><pre class="programlisting">time_t soup_connection_last_used (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn);</pre>
<p>
Returns the last time a response was received on <em class="parameter"><code>conn</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> a <a href="SoupConnection.html" title="SoupConnection"><span class="type">SoupConnection</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the last time a response was received on <em class="parameter"><code>conn</code></em>, or 0
if <em class="parameter"><code>conn</code></em> has not been used yet.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id376104"></a><h3>
<a name="soup-connection-send-request"></a>soup_connection_send_request ()</h3>
<a class="indexterm" name="id376117"></a><pre class="programlisting">void soup_connection_send_request (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a href="SoupMessage.html" title="SoupMessage">SoupMessage</a> *req);</pre>
<p>
Sends <em class="parameter"><code>req</code></em> on <em class="parameter"><code>conn</code></em>. This is a low-level function, intended for use
by <a href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> a <a href="SoupConnection.html" title="SoupConnection"><span class="type">SoupConnection</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>req</code></em> :</span></td>
<td> a <a href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id376226"></a><h3>
<a name="soup-connection-authenticate"></a>soup_connection_authenticate ()</h3>
<a class="indexterm" name="id376236"></a><pre class="programlisting">void soup_connection_authenticate (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a href="SoupMessage.html" title="SoupMessage">SoupMessage</a> *msg,
const char *auth_type,
const char *auth_realm,
char **username,
char **password);</pre>
<p>
Emits the <code class="literal">authenticate</code> signal on <em class="parameter"><code>conn</code></em>. For use by <a href="SoupConnection.html" title="SoupConnection"><span class="type">SoupConnection</span></a>
subclasses.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> a <a href="SoupConnection.html" title="SoupConnection"><span class="type">SoupConnection</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>msg</code></em> :</span></td>
<td> the message to authenticate
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>auth_type</code></em> :</span></td>
<td> type of authentication to use
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>auth_realm</code></em> :</span></td>
<td> authentication realm
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>username</code></em> :</span></td>
<td> on successful return, will contain the username to
authenticate with
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>password</code></em> :</span></td>
<td> on successful return, will contain the password to
authenticate with
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id376399"></a><h3>
<a name="soup-connection-reauthenticate"></a>soup_connection_reauthenticate ()</h3>
<a class="indexterm" name="id376410"></a><pre class="programlisting">void soup_connection_reauthenticate (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a href="SoupMessage.html" title="SoupMessage">SoupMessage</a> *msg,
const char *auth_type,
const char *auth_realm,
char **username,
char **password);</pre>
<p>
Emits the <code class="literal">reauthenticate</code> signal on <em class="parameter"><code>conn</code></em>. For use by
<a href="SoupConnection.html" title="SoupConnection"><span class="type">SoupConnection</span></a> subclasses.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> a <a href="SoupConnection.html" title="SoupConnection"><span class="type">SoupConnection</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>msg</code></em> :</span></td>
<td> the message to authenticate
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>auth_type</code></em> :</span></td>
<td> type of authentication to use
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>auth_realm</code></em> :</span></td>
<td> authentication realm
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>username</code></em> :</span></td>
<td> on successful return, will contain the username to
authenticate with
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>password</code></em> :</span></td>
<td> on successful return, will contain the password to
authenticate with
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id376590"></a><h3>
<a name="soup-connection-release"></a>soup_connection_release ()</h3>
<a class="indexterm" name="id376601"></a><pre class="programlisting">void soup_connection_release (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn);</pre>
<p>
Marks <em class="parameter"><code>conn</code></em> as not "in use". This can be used to cancel the effect
of a <a href="SoupConnection.html#soup-connection-reserve"><code class="function">soup_connection_reserve()</code></a>. It is not necessary to call this
after <a href="SoupConnection.html#soup-connection-send-request"><code class="function">soup_connection_send_request()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> a <a href="SoupConnection.html" title="SoupConnection"><span class="type">SoupConnection</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id376680"></a><h3>
<a name="soup-connection-reserve"></a>soup_connection_reserve ()</h3>
<a class="indexterm" name="id376692"></a><pre class="programlisting">void soup_connection_reserve (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn);</pre>
<p>
Marks <em class="parameter"><code>conn</code></em> as "in use" despite not actually having a message on
it. This is used by <a href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a> to keep it from accidentally
trying to queue two messages on the same connection from different
threads at the same time.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> a <a href="SoupConnection.html" title="SoupConnection"><span class="type">SoupConnection</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id376761"></a><h3>
<a name="SOUP-CONNECTION-ORIGIN-URI:CAPS"></a>SOUP_CONNECTION_ORIGIN_URI</h3>
<a class="indexterm" name="id376772"></a><pre class="programlisting">#define SOUP_CONNECTION_ORIGIN_URI "origin-uri"
</pre>
<p>
An alias for the "origin-uri" property.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id376788"></a><h3>
<a name="SOUP-CONNECTION-PROXY-URI:CAPS"></a>SOUP_CONNECTION_PROXY_URI</h3>
<a class="indexterm" name="id376799"></a><pre class="programlisting">#define SOUP_CONNECTION_PROXY_URI "proxy-uri"
</pre>
<p>
An alias for the "proxy-uri" property.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id376814"></a><h3>
<a name="SOUP-CONNECTION-SSL-CREDENTIALS:CAPS"></a>SOUP_CONNECTION_SSL_CREDENTIALS</h3>
<a class="indexterm" name="id376826"></a><pre class="programlisting">#define SOUP_CONNECTION_SSL_CREDENTIALS "ssl-creds"
</pre>
<p>
An alias for the "ssl-creds" property.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id376841"></a><h3>
<a name="SOUP-CONNECTION-MESSAGE-FILTER:CAPS"></a>SOUP_CONNECTION_MESSAGE_FILTER</h3>
<a class="indexterm" name="id376852"></a><pre class="programlisting">#define SOUP_CONNECTION_MESSAGE_FILTER "message-filter"
</pre>
<p>
An alias for the "message-filter" property.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id376868"></a><h3>
<a name="SOUP-CONNECTION-ASYNC-CONTEXT:CAPS"></a>SOUP_CONNECTION_ASYNC_CONTEXT</h3>
<a class="indexterm" name="id376879"></a><pre class="programlisting">#define SOUP_CONNECTION_ASYNC_CONTEXT "async-context"
</pre>
<p>
An alias for the "async-context" property.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id376895"></a><h3>
<a name="SOUP-CONNECTION-TIMEOUT:CAPS"></a>SOUP_CONNECTION_TIMEOUT</h3>
<a class="indexterm" name="id376906"></a><pre class="programlisting">#define SOUP_CONNECTION_TIMEOUT "timeout"
</pre>
<p>
An alias for the "timeout" property.
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id376923"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="id376933"></a><h3>
<a name="SoupConnection--async-context"></a>The "<code class="literal">async-context</code>" property</h3>
<a class="indexterm" name="id376947"></a><pre class="programlisting"> "async-context" <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> : Read / Write / Construct Only</pre>
<p>GMainContext to dispatch this connection's async I/O in.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id376968"></a><h3>
<a name="SoupConnection--message-filter"></a>The "<code class="literal">message-filter</code>" property</h3>
<a class="indexterm" name="id376982"></a><pre class="programlisting"> "message-filter" <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> : Read / Write</pre>
<p>Message filter object for this connection.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id377003"></a><h3>
<a name="SoupConnection--origin-uri"></a>The "<code class="literal">origin-uri</code>" property</h3>
<a class="indexterm" name="id377017"></a><pre class="programlisting"> "origin-uri" <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> : Read / Write / Construct Only</pre>
<p>The HTTP origin server to use for this connection.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id377038"></a><h3>
<a name="SoupConnection--proxy-uri"></a>The "<code class="literal">proxy-uri</code>" property</h3>
<a class="indexterm" name="id377052"></a><pre class="programlisting"> "proxy-uri" <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> : Read / Write / Construct Only</pre>
<p>The HTTP Proxy to use for this connection.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id377072"></a><h3>
<a name="SoupConnection--ssl-creds"></a>The "<code class="literal">ssl-creds</code>" property</h3>
<a class="indexterm" name="id377086"></a><pre class="programlisting"> "ssl-creds" <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> : Read / Write / Construct Only</pre>
<p>Opaque SSL credentials for this connection.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id377107"></a><h3>
<a name="SoupConnection--timeout"></a>The "<code class="literal">timeout</code>" property</h3>
<a class="indexterm" name="id377121"></a><pre class="programlisting"> "timeout" <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> : Read / Write</pre>
<p>Value in seconds to timeout a blocking I/O.</p>
<p>Default value: 0</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id377146"></a><h2>Signal Details</h2>
<div class="refsect2" lang="en">
<a name="id377157"></a><h3>
<a name="SoupConnection-authenticate"></a>The "authenticate" signal</h3>
<a class="indexterm" name="id377165"></a><pre class="programlisting">void user_function (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a href="SoupMessage.html" title="SoupMessage">SoupMessage</a> *msg,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *auth_type,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *auth_realm,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> username,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> password,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run first</pre>
<p>
Emitted when the connection requires authentication.
(<a href="SoupConnectionNTLM.html" title="SoupConnectionNTLM"><span class="type">SoupConnectionNTLM</span></a> makes use of this.)</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> the connection
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>msg</code></em> :</span></td>
<td> the <a href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> being sent
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>auth_type</code></em> :</span></td>
<td> the authentication type
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>auth_realm</code></em> :</span></td>
<td> the realm being authenticated to
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>username</code></em> :</span></td>
<td> the signal handler should set this to point to
the provided username
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>password</code></em> :</span></td>
<td> the signal handler should set this to point to
the provided password
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id377349"></a><h3>
<a name="SoupConnection-connect-result"></a>The "connect-result" signal</h3>
<a class="indexterm" name="id377357"></a><pre class="programlisting">void user_function (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> status,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run first</pre>
<p>
Emitted when a connection attempt succeeds or fails. This
is used internally by <a href="SoupConnection.html#soup-connection-connect-async"><code class="function">soup_connection_connect_async()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> the connection
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>status</code></em> :</span></td>
<td> the status
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id377454"></a><h3>
<a name="SoupConnection-disconnected"></a>The "disconnected" signal</h3>
<a class="indexterm" name="id377462"></a><pre class="programlisting">void user_function (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run first</pre>
<p>
Emitted when the connection's socket is disconnected, for
whatever reason.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> the connection
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id377529"></a><h3>
<a name="SoupConnection-reauthenticate"></a>The "reauthenticate" signal</h3>
<a class="indexterm" name="id377537"></a><pre class="programlisting">void user_function (<a href="SoupConnection.html" title="SoupConnection">SoupConnection</a> *conn,
<a href="SoupMessage.html" title="SoupMessage">SoupMessage</a> *msg,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *auth_type,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *auth_realm,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> username,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> password,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run first</pre>
<p>
Emitted when the authentication data acquired by a previous
<code class="literal">authenticate</code> or <code class="literal">reauthenticate</code> signal fails.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>conn</code></em> :</span></td>
<td> the connection
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>msg</code></em> :</span></td>
<td> the <a href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> being sent
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>auth_type</code></em> :</span></td>
<td> the authentication type
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>auth_realm</code></em> :</span></td>
<td> the realm being authenticated to
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>username</code></em> :</span></td>
<td> the signal handler should set this to point to
the provided username
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>password</code></em> :</span></td>
<td> the signal handler should set this to point to
the provided password
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>
|