/usr/share/gtk-doc/html/libsoup-2.4/SoupSocket.html is in libsoup2.4-doc 2.38.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SoupSocket</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="libsoup Reference Manual">
<link rel="up" href="ch06.html" title="Low-level Networking API">
<link rel="prev" href="SoupAddress.html" title="SoupAddress">
<link rel="next" href="ch07.html" title="Experimental streaming API">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</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="SoupAddress.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch06.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="ch07.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#SoupSocket.synopsis" class="shortcut">Top</a>
|
<a href="#SoupSocket.description" class="shortcut">Description</a>
|
<a href="#SoupSocket.object-hierarchy" class="shortcut">Object Hierarchy</a>
|
<a href="#SoupSocket.properties" class="shortcut">Properties</a>
|
<a href="#SoupSocket.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="SoupSocket"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="SoupSocket.top_of_page"></a>SoupSocket</span></h2>
<p>SoupSocket — A network socket</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="SoupSocket.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <libsoup/soup.h>
<a class="link" href="SoupSocket.html#SoupSocket-struct" title="SoupSocket">SoupSocket</a>;
<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="returnvalue">SoupSocket</span></a> * <a class="link" href="SoupSocket.html#soup-socket-new" title="soup_socket_new ()">soup_socket_new</a> (<em class="parameter"><code>const <span class="type">char</span> *optname1</code></em>,
<em class="parameter"><code>...</code></em>);
<span class="returnvalue">void</span> (<a class="link" href="SoupSocket.html#SoupSocketCallback" title="SoupSocketCallback ()">*SoupSocketCallback</a>) (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> status</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<span class="returnvalue">void</span> <a class="link" href="SoupSocket.html#soup-socket-connect-async" title="soup_socket_connect_async ()">soup_socket_connect_async</a> (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="SoupSocket.html#SoupSocketCallback" title="SoupSocketCallback ()"><span class="type">SoupSocketCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="SoupSocket.html#soup-socket-connect-sync" title="soup_socket_connect_sync ()">soup_socket_connect_sync</a> (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="SoupSocket.html#soup-socket-listen" title="soup_socket_listen ()">soup_socket_listen</a> (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="SoupSocket.html#soup-socket-start-ssl" title="soup_socket_start_ssl ()">soup_socket_start_ssl</a> (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="SoupSocket.html#soup-socket-start-proxy-ssl" title="soup_socket_start_proxy_ssl ()">soup_socket_start_proxy_ssl</a> (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *ssl_host</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="SoupSocket.html#soup-socket-is-ssl" title="soup_socket_is_ssl ()">soup_socket_is_ssl</a> (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);
<span class="returnvalue">void</span> <a class="link" href="SoupSocket.html#soup-socket-disconnect" title="soup_socket_disconnect ()">soup_socket_disconnect</a> (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="SoupSocket.html#soup-socket-is-connected" title="soup_socket_is_connected ()">soup_socket_is_connected</a> (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);
<a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> * <a class="link" href="SoupSocket.html#soup-socket-get-local-address" title="soup_socket_get_local_address ()">soup_socket_get_local_address</a> (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);
<a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> * <a class="link" href="SoupSocket.html#soup-socket-get-remote-address" title="soup_socket_get_remote_address ()">soup_socket_get_remote_address</a> (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);
enum <a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus">SoupSocketIOStatus</a>;
<a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="returnvalue">SoupSocketIOStatus</span></a> <a class="link" href="SoupSocket.html#soup-socket-read" title="soup_socket_read ()">soup_socket_read</a> (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> buffer</code></em>,
<em class="parameter"><code><span class="type">gsize</span> len</code></em>,
<em class="parameter"><code><span class="type">gsize</span> *nread</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="returnvalue">SoupSocketIOStatus</span></a> <a class="link" href="SoupSocket.html#soup-socket-read-until" title="soup_socket_read_until ()">soup_socket_read_until</a> (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> buffer</code></em>,
<em class="parameter"><code><span class="type">gsize</span> len</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> boundary</code></em>,
<em class="parameter"><code><span class="type">gsize</span> boundary_len</code></em>,
<em class="parameter"><code><span class="type">gsize</span> *nread</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *got_boundary</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="returnvalue">SoupSocketIOStatus</span></a> <a class="link" href="SoupSocket.html#soup-socket-write" title="soup_socket_write ()">soup_socket_write</a> (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> buffer</code></em>,
<em class="parameter"><code><span class="type">gsize</span> len</code></em>,
<em class="parameter"><code><span class="type">gsize</span> *nwrote</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
#define <a class="link" href="SoupSocket.html#SOUP-SOCKET-LOCAL-ADDRESS:CAPS" title="SOUP_SOCKET_LOCAL_ADDRESS">SOUP_SOCKET_LOCAL_ADDRESS</a>
#define <a class="link" href="SoupSocket.html#SOUP-SOCKET-REMOTE-ADDRESS:CAPS" title="SOUP_SOCKET_REMOTE_ADDRESS">SOUP_SOCKET_REMOTE_ADDRESS</a>
#define <a class="link" href="SoupSocket.html#SOUP-SOCKET-FLAG-NONBLOCKING:CAPS" title="SOUP_SOCKET_FLAG_NONBLOCKING">SOUP_SOCKET_FLAG_NONBLOCKING</a>
#define <a class="link" href="SoupSocket.html#SOUP-SOCKET-IS-SERVER:CAPS" title="SOUP_SOCKET_IS_SERVER">SOUP_SOCKET_IS_SERVER</a>
#define <a class="link" href="SoupSocket.html#SOUP-SOCKET-SSL-CREDENTIALS:CAPS" title="SOUP_SOCKET_SSL_CREDENTIALS">SOUP_SOCKET_SSL_CREDENTIALS</a>
#define <a class="link" href="SoupSocket.html#SOUP-SOCKET-ASYNC-CONTEXT:CAPS" title="SOUP_SOCKET_ASYNC_CONTEXT">SOUP_SOCKET_ASYNC_CONTEXT</a>
#define <a class="link" href="SoupSocket.html#SOUP-SOCKET-TIMEOUT:CAPS" title="SOUP_SOCKET_TIMEOUT">SOUP_SOCKET_TIMEOUT</a>
#define <a class="link" href="SoupSocket.html#SOUP-SOCKET-SSL-FALLBACK:CAPS" title="SOUP_SOCKET_SSL_FALLBACK">SOUP_SOCKET_SSL_FALLBACK</a>
#define <a class="link" href="SoupSocket.html#SOUP-SOCKET-SSL-STRICT:CAPS" title="SOUP_SOCKET_SSL_STRICT">SOUP_SOCKET_SSL_STRICT</a>
#define <a class="link" href="SoupSocket.html#SOUP-SOCKET-TLS-CERTIFICATE:CAPS" title="SOUP_SOCKET_TLS_CERTIFICATE">SOUP_SOCKET_TLS_CERTIFICATE</a>
#define <a class="link" href="SoupSocket.html#SOUP-SOCKET-TLS-ERRORS:CAPS" title="SOUP_SOCKET_TLS_ERRORS">SOUP_SOCKET_TLS_ERRORS</a>
#define <a class="link" href="SoupSocket.html#SOUP-SOCKET-TRUSTED-CERTIFICATE:CAPS" title="SOUP_SOCKET_TRUSTED_CERTIFICATE">SOUP_SOCKET_TRUSTED_CERTIFICATE</a>
#define <a class="link" href="SoupSocket.html#SOUP-SOCKET-USE-THREAD-CONTEXT:CAPS" title="SOUP_SOCKET_USE_THREAD_CONTEXT">SOUP_SOCKET_USE_THREAD_CONTEXT</a>
</pre>
</div>
<div class="refsect1">
<a name="SoupSocket.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+----SoupSocket
</pre>
</div>
<div class="refsect1">
<a name="SoupSocket.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="SoupSocket.html#SoupSocket--async-context" title='The "async-context" property'>async-context</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read / Write / Construct Only
"<a class="link" href="SoupSocket.html#SoupSocket--clean-dispose" title='The "clean-dispose" property'>clean-dispose</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Write / Construct Only
"<a class="link" href="SoupSocket.html#SoupSocket--is-server" title='The "is-server" property'>is-server</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read
"<a class="link" href="SoupSocket.html#SoupSocket--local-address" title='The "local-address" property'>local-address</a>" <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>* : Read / Write / Construct Only
"<a class="link" href="SoupSocket.html#SoupSocket--non-blocking" title='The "non-blocking" property'>non-blocking</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write
"<a class="link" href="SoupSocket.html#SoupSocket--remote-address" title='The "remote-address" property'>remote-address</a>" <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>* : Read / Write / Construct Only
"<a class="link" href="SoupSocket.html#SoupSocket--ssl-creds" title='The "ssl-creds" property'>ssl-creds</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read / Write
"<a class="link" href="SoupSocket.html#SoupSocket--ssl-fallback" title='The "ssl-fallback" property'>ssl-fallback</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only
"<a class="link" href="SoupSocket.html#SoupSocket--ssl-strict" title='The "ssl-strict" property'>ssl-strict</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only
"<a class="link" href="SoupSocket.html#SoupSocket--timeout" title='The "timeout" property'>timeout</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write
"<a class="link" href="SoupSocket.html#SoupSocket--tls-certificate" title='The "tls-certificate" property'>tls-certificate</a>" <a href="/usr/share/gtk-doc/html/gio/GTlsCertificate.html"><span class="type">GTlsCertificate</span></a>* : Read
"<a class="link" href="SoupSocket.html#SoupSocket--tls-errors" title='The "tls-errors" property'>tls-errors</a>" <a href="/usr/share/gtk-doc/html/gio/gio-TLS-Overview.html#GTlsCertificateFlags"><span class="type">GTlsCertificateFlags</span></a> : Read
"<a class="link" href="SoupSocket.html#SoupSocket--trusted-certificate" title='The "trusted-certificate" property'>trusted-certificate</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read
"<a class="link" href="SoupSocket.html#SoupSocket--use-thread-context" title='The "use-thread-context" property'>use-thread-context</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1">
<a name="SoupSocket.signals"></a><h2>Signals</h2>
<pre class="synopsis">
"<a class="link" href="SoupSocket.html#SoupSocket-disconnected" title='The "disconnected" signal'>disconnected</a>" : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
"<a class="link" href="SoupSocket.html#SoupSocket-event" title='The "event" signal'>event</a>" : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
"<a class="link" href="SoupSocket.html#SoupSocket-new-connection" title='The "new-connection" signal'>new-connection</a>" : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
"<a class="link" href="SoupSocket.html#SoupSocket-readable" title='The "readable" signal'>readable</a>" : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
"<a class="link" href="SoupSocket.html#SoupSocket-writable" title='The "writable" signal'>writable</a>" : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
</pre>
</div>
<div class="refsect1">
<a name="SoupSocket.description"></a><h2>Description</h2>
<p>
<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> is libsoup's TCP socket type. While it is primarily
intended for internal use, <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>s are exposed in the
API in various places, and some of their methods (eg,
<a class="link" href="SoupSocket.html#soup-socket-get-remote-address" title="soup_socket_get_remote_address ()"><code class="function">soup_socket_get_remote_address()</code></a>) may be useful to applications.
</p>
</div>
<div class="refsect1">
<a name="SoupSocket.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="SoupSocket-struct"></a><h3>SoupSocket</h3>
<pre class="programlisting">typedef struct _SoupSocket SoupSocket;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-new"></a><h3>soup_socket_new ()</h3>
<pre class="programlisting"><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="returnvalue">SoupSocket</span></a> * soup_socket_new (<em class="parameter"><code>const <span class="type">char</span> *optname1</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>
Creates a new (disconnected) socket
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>optname1</code></em> :</span></p></td>
<td>name of first property to set (or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>value of <em class="parameter"><code>optname1</code></em>, followed by additional property/value pairs</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new socket</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocketCallback"></a><h3>SoupSocketCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> (*SoupSocketCallback) (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> status</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
The callback function passed to <a class="link" href="SoupSocket.html#soup-socket-connect-async" title="soup_socket_connect_async ()"><code class="function">soup_socket_connect_async()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>status</code></em> :</span></p></td>
<td>an HTTP status code indicating success or failure</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>the data passed to <a class="link" href="SoupSocket.html#soup-socket-connect-async" title="soup_socket_connect_async ()"><code class="function">soup_socket_connect_async()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-connect-async"></a><h3>soup_socket_connect_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> soup_socket_connect_async (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="SoupSocket.html#SoupSocketCallback" title="SoupSocketCallback ()"><span class="type">SoupSocketCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Begins asynchronously connecting to <em class="parameter"><code>sock</code></em>'s remote address. The
socket will call <em class="parameter"><code>callback</code></em> when it succeeds or fails (but not
before returning from this function).
</p>
<p>
If <em class="parameter"><code>cancellable</code></em> is non-<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it can be used to cancel the
connection. <em class="parameter"><code>callback</code></em> will still be invoked in this case, with a
status of <a class="link" href="libsoup-2.4-soup-status.html#SOUP-STATUS-CANCELLED:CAPS"><code class="literal">SOUP_STATUS_CANCELLED</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a client <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> (which must not already be connected)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>callback to call after connecting. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data to pass to <em class="parameter"><code>callback</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-connect-sync"></a><h3>soup_socket_connect_sync ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> soup_socket_connect_sync (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre>
<p>
Attempt to synchronously connect <em class="parameter"><code>sock</code></em> to its remote address.
</p>
<p>
If <em class="parameter"><code>cancellable</code></em> is non-<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it can be used to cancel the
connection, in which case <a class="link" href="SoupSocket.html#soup-socket-connect-sync" title="soup_socket_connect_sync ()"><code class="function">soup_socket_connect_sync()</code></a> will return
<a class="link" href="libsoup-2.4-soup-status.html#SOUP-STATUS-CANCELLED:CAPS"><code class="literal">SOUP_STATUS_CANCELLED</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a client <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> (which must not already be connected)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a success or failure code.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-listen"></a><h3>soup_socket_listen ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> soup_socket_listen (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);</pre>
<p>
Makes <em class="parameter"><code>sock</code></em> start listening on its local address. When connections
come in, <em class="parameter"><code>sock</code></em> will emit <a class="link" href="SoupSocket.html#SoupSocket-new-connection" title='The "new-connection" signal'><span class="type">"new_connection"</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a server <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> (which must not already be connected or
listening)</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>whether or not <em class="parameter"><code>sock</code></em> is now listening.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-start-ssl"></a><h3>soup_socket_start_ssl ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> soup_socket_start_ssl (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre>
<p>
Starts using SSL on <em class="parameter"><code>socket</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>success or failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-start-proxy-ssl"></a><h3>soup_socket_start_proxy_ssl ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> soup_socket_start_proxy_ssl (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *ssl_host</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre>
<p>
Starts using SSL on <em class="parameter"><code>socket</code></em>, expecting to find a host named
<em class="parameter"><code>ssl_host</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ssl_host</code></em> :</span></p></td>
<td>hostname of the SSL server</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>success or failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-is-ssl"></a><h3>soup_socket_is_ssl ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> soup_socket_is_ssl (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);</pre>
<p>
Tests if <em class="parameter"><code>sock</code></em> is doing (or has attempted to do) SSL.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>sock</code></em> has SSL credentials set</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-disconnect"></a><h3>soup_socket_disconnect ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> soup_socket_disconnect (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);</pre>
<p>
Disconnects <em class="parameter"><code>sock</code></em>. Any further read or write attempts on it will
fail.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-is-connected"></a><h3>soup_socket_is_connected ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> soup_socket_is_connected (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);</pre>
<p>
Tests if <em class="parameter"><code>sock</code></em> is connected to another host
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-get-local-address"></a><h3>soup_socket_get_local_address ()</h3>
<pre class="programlisting"><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> * soup_socket_get_local_address (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);</pre>
<p>
Returns the <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> corresponding to the local end of <em class="parameter"><code>sock</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-get-remote-address"></a><h3>soup_socket_get_remote_address ()</h3>
<pre class="programlisting"><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> * soup_socket_get_remote_address (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);</pre>
<p>
Returns the <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> corresponding to the remote end of <em class="parameter"><code>sock</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocketIOStatus"></a><h3>enum SoupSocketIOStatus</h3>
<pre class="programlisting">typedef enum {
SOUP_SOCKET_OK,
SOUP_SOCKET_WOULD_BLOCK,
SOUP_SOCKET_EOF,
SOUP_SOCKET_ERROR
} SoupSocketIOStatus;
</pre>
<p>
Return value from the <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> IO methods.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="SOUP-SOCKET-OK:CAPS"></a><span class="term"><code class="literal">SOUP_SOCKET_OK</code></span></p></td>
<td>Success
</td>
</tr>
<tr>
<td><p><a name="SOUP-SOCKET-WOULD-BLOCK:CAPS"></a><span class="term"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></span></p></td>
<td>Cannot read/write any more at this time
</td>
</tr>
<tr>
<td><p><a name="SOUP-SOCKET-EOF:CAPS"></a><span class="term"><code class="literal">SOUP_SOCKET_EOF</code></span></p></td>
<td>End of file
</td>
</tr>
<tr>
<td><p><a name="SOUP-SOCKET-ERROR:CAPS"></a><span class="term"><code class="literal">SOUP_SOCKET_ERROR</code></span></p></td>
<td>Other error
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-read"></a><h3>soup_socket_read ()</h3>
<pre class="programlisting"><a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="returnvalue">SoupSocketIOStatus</span></a> soup_socket_read (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> buffer</code></em>,
<em class="parameter"><code><span class="type">gsize</span> len</code></em>,
<em class="parameter"><code><span class="type">gsize</span> *nread</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Attempts to read up to <em class="parameter"><code>len</code></em> bytes from <em class="parameter"><code>sock</code></em> into <em class="parameter"><code>buffer</code></em>. If some
data is successfully read, <a class="link" href="SoupSocket.html#soup-socket-read" title="soup_socket_read ()"><code class="function">soup_socket_read()</code></a> will return
<a class="link" href="SoupSocket.html#SOUP-SOCKET-OK:CAPS"><code class="literal">SOUP_SOCKET_OK</code></a>, and *<em class="parameter"><code>nread</code></em> will contain the number of bytes
actually read (which may be less than <em class="parameter"><code>len</code></em>).
</p>
<p>
If <em class="parameter"><code>sock</code></em> is non-blocking, and no data is available, the return
value will be <a class="link" href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></a>. In this case, the caller
can connect to the <a class="link" href="SoupSocket.html#SoupSocket-readable" title='The "readable" signal'><span class="type">"readable"</span></a> signal to know when there
is more data to read. (NB: You MUST read all available data off the
socket first. <a class="link" href="SoupSocket.html#SoupSocket-readable" title='The "readable" signal'><span class="type">"readable"</span></a> is only emitted after
<a class="link" href="SoupSocket.html#soup-socket-read" title="soup_socket_read ()"><code class="function">soup_socket_read()</code></a> returns <a class="link" href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></a>, and it is only
emitted once. See the documentation for <a class="link" href="SoupSocket.html#SoupSocket--non-blocking" title='The "non-blocking" property'><span class="type">"non-blocking"</span></a>.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>buffer to read into</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>size of <em class="parameter"><code>buffer</code></em> in bytes</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nread</code></em> :</span></p></td>
<td>on return, the number of bytes read into <em class="parameter"><code>buffer</code></em>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>error pointer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="type">SoupSocketIOStatus</span></a>, as described above (or
<a class="link" href="SoupSocket.html#SOUP-SOCKET-EOF:CAPS"><code class="literal">SOUP_SOCKET_EOF</code></a> if the socket is no longer connected, or
<a class="link" href="SoupSocket.html#SOUP-SOCKET-ERROR:CAPS"><code class="literal">SOUP_SOCKET_ERROR</code></a> on any other error, in which case <em class="parameter"><code>error</code></em> will
also be set).</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-read-until"></a><h3>soup_socket_read_until ()</h3>
<pre class="programlisting"><a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="returnvalue">SoupSocketIOStatus</span></a> soup_socket_read_until (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> buffer</code></em>,
<em class="parameter"><code><span class="type">gsize</span> len</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> boundary</code></em>,
<em class="parameter"><code><span class="type">gsize</span> boundary_len</code></em>,
<em class="parameter"><code><span class="type">gsize</span> *nread</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *got_boundary</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Like <a class="link" href="SoupSocket.html#soup-socket-read" title="soup_socket_read ()"><code class="function">soup_socket_read()</code></a>, but reads no further than the first
occurrence of <em class="parameter"><code>boundary</code></em>. (If the boundary is found, it will be
included in the returned data, and *<em class="parameter"><code>got_boundary</code></em> will be set to
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.) Any data after the boundary will returned in future reads.
</p>
<p>
<a class="link" href="SoupSocket.html#soup-socket-read-until" title="soup_socket_read_until ()"><code class="function">soup_socket_read_until()</code></a> will almost always return fewer than <em class="parameter"><code>len</code></em>
bytes: if the boundary is found, then it will only return the bytes
up until the end of the boundary, and if the boundary is not found,
then it will leave the last <code class="literal">(boundary_len - 1)</code>
bytes in its internal buffer, in case they form the start of the
boundary string. Thus, <em class="parameter"><code>len</code></em> normally needs to be at least 1 byte
longer than <em class="parameter"><code>boundary_len</code></em> if you want to make any progress at all.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>buffer to read into</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>size of <em class="parameter"><code>buffer</code></em> in bytes</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>boundary</code></em> :</span></p></td>
<td>boundary to read until</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>boundary_len</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>boundary</code></em> in bytes</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nread</code></em> :</span></p></td>
<td>on return, the number of bytes read into <em class="parameter"><code>buffer</code></em>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>got_boundary</code></em> :</span></p></td>
<td>on return, whether or not the data in <em class="parameter"><code>buffer</code></em>
ends with the boundary string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>error pointer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>as for <a class="link" href="SoupSocket.html#soup-socket-read" title="soup_socket_read ()"><code class="function">soup_socket_read()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-write"></a><h3>soup_socket_write ()</h3>
<pre class="programlisting"><a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="returnvalue">SoupSocketIOStatus</span></a> soup_socket_write (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> buffer</code></em>,
<em class="parameter"><code><span class="type">gsize</span> len</code></em>,
<em class="parameter"><code><span class="type">gsize</span> *nwrote</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Attempts to write <em class="parameter"><code>len</code></em> bytes from <em class="parameter"><code>buffer</code></em> to <em class="parameter"><code>sock</code></em>. If some data is
successfully written, the return status will be <a class="link" href="SoupSocket.html#SOUP-SOCKET-OK:CAPS"><code class="literal">SOUP_SOCKET_OK</code></a>,
and *<em class="parameter"><code>nwrote</code></em> will contain the number of bytes actually written
(which may be less than <em class="parameter"><code>len</code></em>).
</p>
<p>
If <em class="parameter"><code>sock</code></em> is non-blocking, and no data could be written right away,
the return value will be <a class="link" href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></a>. In this case,
the caller can connect to the <a class="link" href="SoupSocket.html#SoupSocket-writable" title='The "writable" signal'><span class="type">"writable"</span></a> signal to know
when more data can be written. (NB: <a class="link" href="SoupSocket.html#SoupSocket-writable" title='The "writable" signal'><span class="type">"writable"</span></a> is only
emitted after <a class="link" href="SoupSocket.html#soup-socket-write" title="soup_socket_write ()"><code class="function">soup_socket_write()</code></a> returns <a class="link" href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></a>,
and it is only emitted once. See the documentation for
<a class="link" href="SoupSocket.html#SoupSocket--non-blocking" title='The "non-blocking" property'><span class="type">"non-blocking"</span></a>.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>data to write</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>size of <em class="parameter"><code>buffer</code></em>, in bytes</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nwrote</code></em> :</span></p></td>
<td>on return, number of bytes written. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>error pointer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="type">SoupSocketIOStatus</span></a>, as described above (or
<a class="link" href="SoupSocket.html#SOUP-SOCKET-EOF:CAPS"><code class="literal">SOUP_SOCKET_EOF</code></a> or <a class="link" href="SoupSocket.html#SOUP-SOCKET-ERROR:CAPS"><code class="literal">SOUP_SOCKET_ERROR</code></a>. <em class="parameter"><code>error</code></em> will be set if the
return value is <a class="link" href="SoupSocket.html#SOUP-SOCKET-ERROR:CAPS"><code class="literal">SOUP_SOCKET_ERROR</code></a>.)</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-LOCAL-ADDRESS:CAPS"></a><h3>SOUP_SOCKET_LOCAL_ADDRESS</h3>
<pre class="programlisting">#define SOUP_SOCKET_LOCAL_ADDRESS "local-address"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--local-address" title='The "local-address" property'><span class="type">"local-address"</span></a> property. (Address
of local end of socket.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-REMOTE-ADDRESS:CAPS"></a><h3>SOUP_SOCKET_REMOTE_ADDRESS</h3>
<pre class="programlisting">#define SOUP_SOCKET_REMOTE_ADDRESS "remote-address"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--remote-address" title='The "remote-address" property'><span class="type">"remote-address"</span></a> property. (Address
of remote end of socket.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-FLAG-NONBLOCKING:CAPS"></a><h3>SOUP_SOCKET_FLAG_NONBLOCKING</h3>
<pre class="programlisting">#define SOUP_SOCKET_FLAG_NONBLOCKING "non-blocking"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--non-blocking" title='The "non-blocking" property'><span class="type">"non-blocking"</span></a> property. (Whether
or not the socket uses non-blocking I/O.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-IS-SERVER:CAPS"></a><h3>SOUP_SOCKET_IS_SERVER</h3>
<pre class="programlisting">#define SOUP_SOCKET_IS_SERVER "is-server"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--is-server" title='The "is-server" property'><span class="type">"is-server"</span></a> property. (Whether or
not the socket is a server socket.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-SSL-CREDENTIALS:CAPS"></a><h3>SOUP_SOCKET_SSL_CREDENTIALS</h3>
<pre class="programlisting">#define SOUP_SOCKET_SSL_CREDENTIALS "ssl-creds"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--ssl-creds" title='The "ssl-creds" property'><span class="type">"ssl-creds"</span></a> property.
(SSL credential information.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-ASYNC-CONTEXT:CAPS"></a><h3>SOUP_SOCKET_ASYNC_CONTEXT</h3>
<pre class="programlisting">#define SOUP_SOCKET_ASYNC_CONTEXT "async-context"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--async-context" title='The "async-context" property'><span class="type">"async-context"</span></a> property. (The
socket's <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a>.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-TIMEOUT:CAPS"></a><h3>SOUP_SOCKET_TIMEOUT</h3>
<pre class="programlisting">#define SOUP_SOCKET_TIMEOUT "timeout"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--timeout" title='The "timeout" property'><span class="type">"timeout"</span></a> property. (The timeout
in seconds for blocking socket I/O operations.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-SSL-FALLBACK:CAPS"></a><h3>SOUP_SOCKET_SSL_FALLBACK</h3>
<pre class="programlisting">#define SOUP_SOCKET_SSL_FALLBACK "ssl-fallback"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--ssl-fallback" title='The "ssl-fallback" property'><span class="type">"ssl-fallback"</span></a> property.
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-SSL-STRICT:CAPS"></a><h3>SOUP_SOCKET_SSL_STRICT</h3>
<pre class="programlisting">#define SOUP_SOCKET_SSL_STRICT "ssl-strict"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--ssl-strict" title='The "ssl-strict" property'><span class="type">"ssl-strict"</span></a> property.
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-TLS-CERTIFICATE:CAPS"></a><h3>SOUP_SOCKET_TLS_CERTIFICATE</h3>
<pre class="programlisting">#define SOUP_SOCKET_TLS_CERTIFICATE "tls-certificate"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--tls-certificate" title='The "tls-certificate" property'><span class="type">"tls-certificate"</span></a>
property. Note that this property's value is only useful
if the socket is for a TLS connection, and only reliable
after some data has been transferred to or from it.
</p>
<p class="since">Since 2.34</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-TLS-ERRORS:CAPS"></a><h3>SOUP_SOCKET_TLS_ERRORS</h3>
<pre class="programlisting">#define SOUP_SOCKET_TLS_ERRORS "tls-errors"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--tls-errors" title='The "tls-errors" property'><span class="type">"tls-errors"</span></a>
property. Note that this property's value is only useful
if the socket is for a TLS connection, and only reliable
after some data has been transferred to or from it.
</p>
<p class="since">Since 2.34</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-TRUSTED-CERTIFICATE:CAPS"></a><h3>SOUP_SOCKET_TRUSTED_CERTIFICATE</h3>
<pre class="programlisting">#define SOUP_SOCKET_TRUSTED_CERTIFICATE "trusted-certificate"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--trusted-certificate" title='The "trusted-certificate" property'><span class="type">"trusted-certificate"</span></a>
property.
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-USE-THREAD-CONTEXT:CAPS"></a><h3>SOUP_SOCKET_USE_THREAD_CONTEXT</h3>
<pre class="programlisting">#define SOUP_SOCKET_USE_THREAD_CONTEXT "use-thread-context"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--use-thread-context" title='The "use-thread-context" property'><span class="type">"use-thread-context"</span></a> property. (Use
<a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#g-main-context-get-thread-default"><code class="function">g_main_context_get_thread_default()</code></a>)
</p>
<p class="since">Since 2.36.1</p>
</div>
</div>
<div class="refsect1">
<a name="SoupSocket.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="SoupSocket--async-context"></a><h3>The <code class="literal">"async-context"</code> property</h3>
<pre class="programlisting"> "async-context" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read / Write / Construct Only</pre>
<p>The GMainContext to dispatch this socket's async I/O in.</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--clean-dispose"></a><h3>The <code class="literal">"clean-dispose"</code> property</h3>
<pre class="programlisting"> "clean-dispose" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Write / Construct Only</pre>
<p>Warn on unclean dispose.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--is-server"></a><h3>The <code class="literal">"is-server"</code> property</h3>
<pre class="programlisting"> "is-server" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read</pre>
<p>Whether or not the socket is a server socket.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--local-address"></a><h3>The <code class="literal">"local-address"</code> property</h3>
<pre class="programlisting"> "local-address" <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>* : Read / Write / Construct Only</pre>
<p>Address of local end of socket.</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--non-blocking"></a><h3>The <code class="literal">"non-blocking"</code> property</h3>
<pre class="programlisting"> "non-blocking" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write</pre>
<p>
Whether or not the socket uses non-blocking I/O.
</p>
<p>
<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>'s I/O methods are designed around the idea of
using a single codepath for both synchronous and
asynchronous I/O. If you want to read off a <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>,
the "correct" way to do it is to call <a class="link" href="SoupSocket.html#soup-socket-read" title="soup_socket_read ()"><code class="function">soup_socket_read()</code></a> or
<a class="link" href="SoupSocket.html#soup-socket-read-until" title="soup_socket_read_until ()"><code class="function">soup_socket_read_until()</code></a> repeatedly until you have read
everything you want. If it returns <a class="link" href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></a>
at any point, stop reading and wait for it to emit the
<a class="link" href="SoupSocket.html#SoupSocket-readable" title='The "readable" signal'><span class="type">"readable"</span></a> signal. Then go back to the
reading-as-much-as-you-can loop. Likewise, for writing to a
<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>, you should call <a class="link" href="SoupSocket.html#soup-socket-write" title="soup_socket_write ()"><code class="function">soup_socket_write()</code></a> either
until you have written everything, or it returns
<a class="link" href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></a> (in which case you wait for
<a class="link" href="SoupSocket.html#SoupSocket-writable" title='The "writable" signal'><span class="type">"writable"</span></a> and then go back into the loop).
</p>
<p>
Code written this way will work correctly with both
blocking and non-blocking sockets; blocking sockets will
simply never return <a class="link" href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></a>, and so the
code that handles that case just won't get used for them.
</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--remote-address"></a><h3>The <code class="literal">"remote-address"</code> property</h3>
<pre class="programlisting"> "remote-address" <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>* : Read / Write / Construct Only</pre>
<p>Address of remote end of socket.</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--ssl-creds"></a><h3>The <code class="literal">"ssl-creds"</code> property</h3>
<pre class="programlisting"> "ssl-creds" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read / Write</pre>
<p>SSL credential information, passed from the session to the SSL implementation.</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--ssl-fallback"></a><h3>The <code class="literal">"ssl-fallback"</code> property</h3>
<pre class="programlisting"> "ssl-fallback" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only</pre>
<p>Use SSLv3 instead of TLS (client-side only).</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--ssl-strict"></a><h3>The <code class="literal">"ssl-strict"</code> property</h3>
<pre class="programlisting"> "ssl-strict" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only</pre>
<p>Whether certificate errors should be considered a connection error.</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--timeout"></a><h3>The <code class="literal">"timeout"</code> property</h3>
<pre class="programlisting"> "timeout" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre>
<p>Value in seconds to timeout a blocking I/O.</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--tls-certificate"></a><h3>The <code class="literal">"tls-certificate"</code> property</h3>
<pre class="programlisting"> "tls-certificate" <a href="/usr/share/gtk-doc/html/gio/GTlsCertificate.html"><span class="type">GTlsCertificate</span></a>* : Read</pre>
<p>The peer's TLS certificate.</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--tls-errors"></a><h3>The <code class="literal">"tls-errors"</code> property</h3>
<pre class="programlisting"> "tls-errors" <a href="/usr/share/gtk-doc/html/gio/gio-TLS-Overview.html#GTlsCertificateFlags"><span class="type">GTlsCertificateFlags</span></a> : Read</pre>
<p>Errors with the peer's TLS certificate.</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--trusted-certificate"></a><h3>The <code class="literal">"trusted-certificate"</code> property</h3>
<pre class="programlisting"> "trusted-certificate" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read</pre>
<p>Whether the server certificate is trusted, if this is an SSL socket.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--use-thread-context"></a><h3>The <code class="literal">"use-thread-context"</code> property</h3>
<pre class="programlisting"> "use-thread-context" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only</pre>
<p>
Use <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#g-main-context-get-thread-default"><code class="function">g_main_context_get_thread_default()</code></a>.
</p>
<p>Default value: FALSE</p>
<p class="since">Since 2.36.1</p>
</div>
</div>
<div class="refsect1">
<a name="SoupSocket.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="SoupSocket-disconnected"></a><h3>The <code class="literal">"disconnected"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
<p>
Emitted when the socket is disconnected, for whatever
reason.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket-event"></a><h3>The <code class="literal">"event"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock,
<a href="/usr/share/gtk-doc/html/gio/GSocketClient.html#GSocketClientEvent"><span class="type">GSocketClientEvent</span></a> event,
<a href="/usr/share/gtk-doc/html/gio/GIOStream.html"><span class="type">GIOStream</span></a> *connection,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
<p>
Emitted when a network-related event occurs. See
<a href="/usr/share/gtk-doc/html/gio/GSocketClient.html#GSocketClient-event"><span class="type">"event"</span></a> for more details.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>the event that occurred</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>the current connection state</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.38</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket-new-connection"></a><h3>The <code class="literal">"new-connection"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock,
<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *new,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
Emitted when a listening socket (set up with
<a class="link" href="SoupSocket.html#soup-socket-listen" title="soup_socket_listen ()"><code class="function">soup_socket_listen()</code></a>) receives a new connection.
</p>
<p>
You must ref the <em class="parameter"><code>new</code></em> if you want to keep it; otherwise it
will be destroyed after the signal is emitted.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>new</code></em> :</span></p></td>
<td>the new socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket-readable"></a><h3>The <code class="literal">"readable"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
<p>
Emitted when an async socket is readable. See
<a class="link" href="SoupSocket.html#soup-socket-read" title="soup_socket_read ()"><code class="function">soup_socket_read()</code></a>, <a class="link" href="SoupSocket.html#soup-socket-read-until" title="soup_socket_read_until ()"><code class="function">soup_socket_read_until()</code></a> and
<a class="link" href="SoupSocket.html#SoupSocket--non-blocking" title='The "non-blocking" property'><span class="type">"non-blocking"</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket-writable"></a><h3>The <code class="literal">"writable"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
<p>
Emitted when an async socket is writable. See
<a class="link" href="SoupSocket.html#soup-socket-write" title="soup_socket_write ()"><code class="function">soup_socket_write()</code></a> and <a class="link" href="SoupSocket.html#SoupSocket--non-blocking" title='The "non-blocking" property'><span class="type">"non-blocking"</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>
|