| 12
 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
 1131
 1132
 1133
 1134
 1135
 1136
 1137
 1138
 1139
 1140
 1141
 1142
 1143
 1144
 1145
 1146
 1147
 1148
 1149
 1150
 1151
 1152
 1153
 1154
 1155
 1156
 1157
 1158
 1159
 1160
 1161
 1162
 1163
 1164
 1165
 1166
 1167
 1168
 1169
 1170
 1171
 1172
 1173
 1174
 1175
 1176
 1177
 1178
 1179
 1180
 1181
 1182
 1183
 1184
 1185
 1186
 1187
 1188
 1189
 1190
 1191
 1192
 1193
 1194
 1195
 1196
 1197
 1198
 1199
 1200
 1201
 1202
 1203
 1204
 1205
 1206
 1207
 1208
 1209
 1210
 1211
 1212
 1213
 1214
 1215
 1216
 1217
 1218
 1219
 1220
 1221
 1222
 1223
 1224
 1225
 1226
 1227
 1228
 1229
 1230
 1231
 1232
 1233
 1234
 1235
 1236
 1237
 1238
 1239
 1240
 1241
 1242
 1243
 1244
 1245
 1246
 1247
 1248
 1249
 1250
 1251
 1252
 1253
 1254
 1255
 1256
 1257
 1258
 1259
 1260
 1261
 1262
 1263
 1264
 1265
 1266
 1267
 1268
 1269
 1270
 1271
 1272
 1273
 1274
 1275
 1276
 1277
 1278
 1279
 1280
 1281
 1282
 1283
 1284
 1285
 1286
 1287
 1288
 1289
 1290
 1291
 1292
 1293
 1294
 1295
 1296
 1297
 1298
 1299
 1300
 1301
 1302
 1303
 1304
 1305
 1306
 1307
 1308
 1309
 1310
 1311
 1312
 1313
 1314
 1315
 1316
 1317
 1318
 1319
 1320
 1321
 1322
 1323
 1324
 1325
 1326
 1327
 1328
 1329
 1330
 1331
 1332
 1333
 1334
 1335
 1336
 1337
 1338
 1339
 1340
 1341
 1342
 1343
 1344
 1345
 1346
 1347
 1348
 1349
 1350
 1351
 1352
 1353
 1354
 1355
 1356
 1357
 1358
 1359
 1360
 1361
 1362
 1363
 1364
 1365
 1366
 1367
 1368
 1369
 1370
 1371
 1372
 1373
 1374
 1375
 1376
 1377
 1378
 1379
 1380
 1381
 1382
 1383
 1384
 1385
 1386
 1387
 1388
 1389
 1390
 1391
 1392
 1393
 1394
 1395
 1396
 1397
 1398
 1399
 1400
 1401
 1402
 1403
 1404
 1405
 1406
 1407
 1408
 1409
 1410
 1411
 1412
 1413
 1414
 1415
 1416
 1417
 1418
 1419
 1420
 1421
 1422
 1423
 1424
 1425
 1426
 1427
 1428
 1429
 1430
 1431
 1432
 1433
 1434
 1435
 1436
 1437
 1438
 1439
 1440
 
 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>SoupSocket</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="SoupSoapResponse.html" title="SoupSoapResponse">
<link rel="next" href="libsoup-soup-status.html" title="soup-status">
<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="SoupSoapResponse.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="libsoup-soup-status.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="#id338840" class="shortcut">Top</a>
                   | 
                  <a href="#id404953" class="shortcut">Description</a>
                   | 
                  <a href="#id404641" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#id404664" class="shortcut">Properties</a>
                   | 
                  <a href="#id404790" class="shortcut">Signals</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="SoupSocket"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id338840"></a><span class="refentrytitle">SoupSocket</span>
</h2>
<p>SoupSocket — a network socket</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
struct      <a href="SoupSocket.html#SoupSocket-struct">SoupSocket</a>;
<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a>* <a href="SoupSocket.html#soup-socket-new">soup_socket_new</a>                 (const char *optname1,
                                             ...);
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a>       <a href="SoupSocket.html#soup-socket-connect">soup_socket_connect</a>             (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             <a href="SoupAddress.html" title="SoupAddress">SoupAddress</a> *remote_addr);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="SoupSocket.html#soup-socket-listen">soup_socket_listen</a>              (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             <a href="SoupAddress.html" title="SoupAddress">SoupAddress</a> *local_addr);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="SoupSocket.html#soup-socket-start-ssl">soup_socket_start_ssl</a>           (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="SoupSocket.html#soup-socket-start-proxy-ssl">soup_socket_start_proxy_ssl</a>     (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             const char *ssl_host);
void        <a href="SoupSocket.html#soup-socket-disconnect">soup_socket_disconnect</a>          (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="SoupSocket.html#soup-socket-is-connected">soup_socket_is_connected</a>        (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock);
void        (<a href="SoupSocket.html#SoupSocketCallback">*SoupSocketCallback</a>)           (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> status,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);
void        (<a href="SoupSocket.html#SoupSocketListenerCallback">*SoupSocketListenerCallback</a>)   (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *listener,
                                             <a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);
<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a>* <a href="SoupSocket.html#soup-socket-client-new-async">soup_socket_client_new_async</a>    (const char *hostname,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> port,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> ssl_creds,
                                             <a href="SoupSocket.html#SoupSocketCallback">SoupSocketCallback</a> callback,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);
<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a>* <a href="SoupSocket.html#soup-socket-client-new-sync">soup_socket_client_new_sync</a>     (const char *hostname,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> port,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> ssl_creds,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> *status_ret);
<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a>* <a href="SoupSocket.html#soup-socket-server-new">soup_socket_server_new</a>          (<a href="SoupAddress.html" title="SoupAddress">SoupAddress</a> *local_addr,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> ssl_creds,
                                             <a href="SoupSocket.html#SoupSocketListenerCallback">SoupSocketListenerCallback</a> callback,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);
<a href="SoupAddress.html" title="SoupAddress">SoupAddress</a>* <a href="SoupSocket.html#soup-socket-get-local-address">soup_socket_get_local_address</a>  (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock);
<a href="SoupAddress.html" title="SoupAddress">SoupAddress</a>* <a href="SoupSocket.html#soup-socket-get-remote-address">soup_socket_get_remote_address</a> (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock);
enum        <a href="SoupSocket.html#SoupSocketIOStatus">SoupSocketIOStatus</a>;
<a href="SoupSocket.html#SoupSocketIOStatus">SoupSocketIOStatus</a> <a href="SoupSocket.html#soup-socket-read">soup_socket_read</a>         (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> buffer,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> len,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> *nread);
<a href="SoupSocket.html#SoupSocketIOStatus">SoupSocketIOStatus</a> <a href="SoupSocket.html#soup-socket-read-until">soup_socket_read_until</a>   (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> buffer,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> len,
                                             <a
href="../glib/glib-Basic-Types.html#gconstpointer"
>gconstpointer</a> boundary,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> boundary_len,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> *nread,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> *got_boundary);
<a href="SoupSocket.html#SoupSocketIOStatus">SoupSocketIOStatus</a> <a href="SoupSocket.html#soup-socket-write">soup_socket_write</a>        (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             <a
href="../glib/glib-Basic-Types.html#gconstpointer"
>gconstpointer</a> buffer,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> len,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> *nwrote);
#define     <a href="SoupSocket.html#SOUP-SOCKET-FLAG-NONBLOCKING:CAPS">SOUP_SOCKET_FLAG_NONBLOCKING</a>
#define     <a href="SoupSocket.html#SOUP-SOCKET-FLAG-NODELAY:CAPS">SOUP_SOCKET_FLAG_NODELAY</a>
#define     <a href="SoupSocket.html#SOUP-SOCKET-FLAG-REUSEADDR:CAPS">SOUP_SOCKET_FLAG_REUSEADDR</a>
#define     <a href="SoupSocket.html#SOUP-SOCKET-FLAG-CLOEXEC:CAPS">SOUP_SOCKET_FLAG_CLOEXEC</a>
#define     <a href="SoupSocket.html#SOUP-SOCKET-TIMEOUT:CAPS">SOUP_SOCKET_TIMEOUT</a>
#define     <a href="SoupSocket.html#SOUP-SOCKET-IS-SERVER:CAPS">SOUP_SOCKET_IS_SERVER</a>
#define     <a href="SoupSocket.html#SOUP-SOCKET-SSL-CREDENTIALS:CAPS">SOUP_SOCKET_SSL_CREDENTIALS</a>
#define     <a href="SoupSocket.html#SOUP-SOCKET-ASYNC-CONTEXT:CAPS">SOUP_SOCKET_ASYNC_CONTEXT</a>
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id404641"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----SoupSocket
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id404664"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a href="SoupSocket.html#SoupSocket--async-context">async-context</a>"        <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>              : Read / Write / Construct Only
  "<a href="SoupSocket.html#SoupSocket--cloexec">cloexec</a>"              <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write
  "<a href="SoupSocket.html#SoupSocket--is-server">is-server</a>"            <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read
  "<a href="SoupSocket.html#SoupSocket--nodelay">nodelay</a>"              <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write
  "<a href="SoupSocket.html#SoupSocket--non-blocking">non-blocking</a>"         <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write
  "<a href="SoupSocket.html#SoupSocket--reuseaddr">reuseaddr</a>"            <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write
  "<a href="SoupSocket.html#SoupSocket--ssl-creds">ssl-creds</a>"            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>              : Read / Write
  "<a href="SoupSocket.html#SoupSocket--timeout">timeout</a>"              <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a>                 : Read / Write
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id404790"></a><h2>Signals</h2>
<pre class="synopsis">
"<a href="SoupSocket.html#SoupSocket-connect-result">connect-result</a>"
            void        user_function      (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                            <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="SoupSocket.html#SoupSocket-disconnected">disconnected</a>"
            void        user_function      (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    user_data)      : Run last
"<a href="SoupSocket.html#SoupSocket-new-connection">new-connection</a>"
            void        user_function      (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                            <a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *new,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    user_data)      : Run first
"<a href="SoupSocket.html#SoupSocket-readable">readable</a>"  void        user_function      (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    user_data)      : Run last
"<a href="SoupSocket.html#SoupSocket-writable">writable</a>"  void        user_function      (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    user_data)      : Run last
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id404953"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1" lang="en">
<a name="id404971"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id404982"></a><h3>
<a name="SoupSocket-struct"></a>struct SoupSocket</h3>
<a class="indexterm" name="id404995"></a><pre class="programlisting">struct SoupSocket;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id405012"></a><h3>
<a name="soup-socket-new"></a>soup_socket_new ()</h3>
<a class="indexterm" name="id405025"></a><pre class="programlisting"><a href="SoupSocket.html" title="SoupSocket">SoupSocket</a>* soup_socket_new                 (const char *optname1,
                                             ...);</pre>
<p>
Creates a new (disconnected) socket</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>optname1</code></em> :</span></td>
<td> name of first property to set (or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>...</code></em> :</span></td>
<td> value of <em class="parameter"><code>optname1</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 socket
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id405123"></a><h3>
<a name="soup-socket-connect"></a>soup_socket_connect ()</h3>
<a class="indexterm" name="id405136"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a>       soup_socket_connect             (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             <a href="SoupAddress.html" title="SoupAddress">SoupAddress</a> *remote_addr);</pre>
<p>
If <a href="SoupSocket.html#SOUP-SOCKET-FLAG-NONBLOCKING:CAPS"><code class="literal">SOUP_SOCKET_FLAG_NONBLOCKING</code></a> has been set on the socket, this
begins asynchronously connecting to the given address. The socket
will emit <code class="literal">connect_result</code> when it succeeds or fails (but not before
returning from this function).
</p>
<p>
If <a href="SoupSocket.html#SOUP-SOCKET-FLAG-NONBLOCKING:CAPS"><code class="literal">SOUP_SOCKET_FLAG_NONBLOCKING</code></a> has not been set, this will
attempt to synchronously connect.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>sock</code></em> :</span></td>
<td> a client <a href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> (which must not already be connected)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>remote_addr</code></em> :</span></td>
<td> address to connect to
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a href="libsoup-soup-status.html#SOUP-STATUS-CONTINUE:CAPS"><code class="literal">SOUP_STATUS_CONTINUE</code></a> if connecting asynchronously,
otherwise a success or failure code.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id405278"></a><h3>
<a name="soup-socket-listen"></a>soup_socket_listen ()</h3>
<a class="indexterm" name="id405291"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    soup_socket_listen              (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             <a href="SoupAddress.html" title="SoupAddress">SoupAddress</a> *local_addr);</pre>
<p>
Makes <em class="parameter"><code>sock</code></em> start listening on the given interface and port. When
connections come in, <em class="parameter"><code>sock</code></em> will emit <code class="literal">new_connection</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>sock</code></em> :</span></td>
<td> a server <a href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> (which must not already be connected or
listening)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>local_addr</code></em> :</span></td>
<td> Local address to bind to.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></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" lang="en">
<a name="id405417"></a><h3>
<a name="soup-socket-start-ssl"></a>soup_socket_start_ssl ()</h3>
<a class="indexterm" name="id405430"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    soup_socket_start_ssl           (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock);</pre>
<p>
Starts using SSL on <em class="parameter"><code>socket</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>sock</code></em> :</span></td>
<td> the socket
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> success or failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id405502"></a><h3>
<a name="soup-socket-start-proxy-ssl"></a>soup_socket_start_proxy_ssl ()</h3>
<a class="indexterm" name="id405512"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    soup_socket_start_proxy_ssl     (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             const char *ssl_host);</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>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>sock</code></em> :</span></td>
<td> the socket
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ssl_host</code></em> :</span></td>
<td> hostname of the SSL server
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> success or failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id405592"></a><h3>
<a name="soup-socket-disconnect"></a>soup_socket_disconnect ()</h3>
<a class="indexterm" name="id405602"></a><pre class="programlisting">void        soup_socket_disconnect          (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock);</pre>
<p>
Disconnects <em class="parameter"><code>sock</code></em>. Any further read or write attempts on it will
fail.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>sock</code></em> :</span></td>
<td> a <a href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id405655"></a><h3>
<a name="soup-socket-is-connected"></a>soup_socket_is_connected ()</h3>
<a class="indexterm" name="id405667"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    soup_socket_is_connected        (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock);</pre>
<p>
Tests if <em class="parameter"><code>sock</code></em> is connected to another host</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>sock</code></em> :</span></td>
<td> a <a href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</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> or <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id405756"></a><h3>
<a name="SoupSocketCallback"></a>SoupSocketCallback ()</h3>
<a class="indexterm" name="id405767"></a><pre class="programlisting">void        (*SoupSocketCallback)           (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> status,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);</pre>
<p>
The callback function passed to <a href="SoupSocket.html#soup-socket-client-new-async"><code class="function">soup_socket_client_new_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>sock</code></em> :</span></td>
<td> the <a href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</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>user_data</code></em> :</span></td>
<td> the data passed to <a href="SoupSocket.html#soup-socket-client-new-async"><code class="function">soup_socket_client_new_async()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id405880"></a><h3>
<a name="SoupSocketListenerCallback"></a>SoupSocketListenerCallback ()</h3>
<a class="indexterm" name="id405891"></a><pre class="programlisting">void        (*SoupSocketListenerCallback)   (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *listener,
                                             <a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);</pre>
<p>
The callback function passed to <a href="SoupSocket.html#soup-socket-server-new"><code class="function">soup_socket_server_new()</code></a>, which
receives new connections.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>listener</code></em> :</span></td>
<td> the listening <a href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>sock</code></em> :</span></td>
<td> the newly-received <a href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td> the data passed to <a href="SoupSocket.html#soup-socket-server-new"><code class="function">soup_socket_server_new()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id406011"></a><h3>
<a name="soup-socket-client-new-async"></a>soup_socket_client_new_async ()</h3>
<a class="indexterm" name="id406023"></a><pre class="programlisting"><a href="SoupSocket.html" title="SoupSocket">SoupSocket</a>* soup_socket_client_new_async    (const char *hostname,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> port,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> ssl_creds,
                                             <a href="SoupSocket.html#SoupSocketCallback">SoupSocketCallback</a> callback,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);</pre>
<p>
Creates a connection to <em class="parameter"><code>hostname</code></em> and <em class="parameter"><code>port</code></em>. <em class="parameter"><code>callback</code></em> will be
called when the connection completes (or fails).
</p>
<p>
Uses the default <a
href="../glib/glib-The-Main-Event-Loop.html#GMainContext"
><span class="type">GMainContext</span></a>. If you need to use an alternate
context, use <a href="SoupSocket.html#soup-socket-new"><code class="function">soup_socket_new()</code></a> and <a href="SoupSocket.html#soup-socket-connect"><code class="function">soup_socket_connect()</code></a> directly.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hostname</code></em> :</span></td>
<td> remote machine to connect to
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>port</code></em> :</span></td>
<td> remote port to connect to
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ssl_creds</code></em> :</span></td>
<td> SSL credentials structure, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if not SSL
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>callback</code></em> :</span></td>
<td> callback to call when the socket is connected
</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>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the new socket (not yet ready for use).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id406224"></a><h3>
<a name="soup-socket-client-new-sync"></a>soup_socket_client_new_sync ()</h3>
<a class="indexterm" name="id406235"></a><pre class="programlisting"><a href="SoupSocket.html" title="SoupSocket">SoupSocket</a>* soup_socket_client_new_sync     (const char *hostname,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> port,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> ssl_creds,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> *status_ret);</pre>
<p>
Creates a connection to <em class="parameter"><code>hostname</code></em> and <em class="parameter"><code>port</code></em>. If <em class="parameter"><code>status_ret</code></em> is not
<a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, it will contain a status code on return.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hostname</code></em> :</span></td>
<td> remote machine to connect to
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>port</code></em> :</span></td>
<td> remote port to connect to
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ssl_creds</code></em> :</span></td>
<td> SSL credentials structure, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if not SSL
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>status_ret</code></em> :</span></td>
<td> pointer to return the soup status in
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the new socket, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if it could not connect.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id406399"></a><h3>
<a name="soup-socket-server-new"></a>soup_socket_server_new ()</h3>
<a class="indexterm" name="id406411"></a><pre class="programlisting"><a href="SoupSocket.html" title="SoupSocket">SoupSocket</a>* soup_socket_server_new          (<a href="SoupAddress.html" title="SoupAddress">SoupAddress</a> *local_addr,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> ssl_creds,
                                             <a href="SoupSocket.html#SoupSocketListenerCallback">SoupSocketListenerCallback</a> callback,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);</pre>
<p>
Create and open a new <a href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> listening on the specified
address. <em class="parameter"><code>callback</code></em> will be called each time a client connects,
with a new <a href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>.
</p>
<p>
Uses the default <a
href="../glib/glib-The-Main-Event-Loop.html#GMainContext"
><span class="type">GMainContext</span></a>. If you need to use an alternate
context, use <a href="SoupSocket.html#soup-socket-new"><code class="function">soup_socket_new()</code></a> and <a href="SoupSocket.html#soup-socket-listen"><code class="function">soup_socket_listen()</code></a> directly.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>local_addr</code></em> :</span></td>
<td> Local address to bind to. (Use <code class="function">soup_address_any_new()</code> to
accept connections on any local address)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ssl_creds</code></em> :</span></td>
<td> SSL credentials, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if this is not an SSL server
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>callback</code></em> :</span></td>
<td> Callback to call when a client connects
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td> data to pass to <em class="parameter"><code>callback</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a new <a href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>, or NULL if there was a failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id406610"></a><h3>
<a name="soup-socket-get-local-address"></a>soup_socket_get_local_address ()</h3>
<a class="indexterm" name="id406622"></a><pre class="programlisting"><a href="SoupAddress.html" title="SoupAddress">SoupAddress</a>* soup_socket_get_local_address  (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock);</pre>
<p>
Returns the <a 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>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>sock</code></em> :</span></td>
<td> a <a href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the <a href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id406707"></a><h3>
<a name="soup-socket-get-remote-address"></a>soup_socket_get_remote_address ()</h3>
<a class="indexterm" name="id406718"></a><pre class="programlisting"><a href="SoupAddress.html" title="SoupAddress">SoupAddress</a>* soup_socket_get_remote_address (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock);</pre>
<p>
Returns the <a 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>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>sock</code></em> :</span></td>
<td> a <a href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the <a href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id406803"></a><h3>
<a name="SoupSocketIOStatus"></a>enum SoupSocketIOStatus</h3>
<a class="indexterm" name="id406815"></a><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 href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> IO methods.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="SOUP-SOCKET-OK:CAPS"></a><code class="literal">SOUP_SOCKET_OK</code></span></td>
<td> Success
</td>
</tr>
<tr>
<td>
<span class="term"><a name="SOUP-SOCKET-WOULD-BLOCK:CAPS"></a><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></span></td>
<td> Cannot read/write any more at this time
</td>
</tr>
<tr>
<td>
<span class="term"><a name="SOUP-SOCKET-EOF:CAPS"></a><code class="literal">SOUP_SOCKET_EOF</code></span></td>
<td> End of file
</td>
</tr>
<tr>
<td>
<span class="term"><a name="SOUP-SOCKET-ERROR:CAPS"></a><code class="literal">SOUP_SOCKET_ERROR</code></span></td>
<td> Other error
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id406929"></a><h3>
<a name="soup-socket-read"></a>soup_socket_read ()</h3>
<a class="indexterm" name="id406940"></a><pre class="programlisting"><a href="SoupSocket.html#SoupSocketIOStatus">SoupSocketIOStatus</a> soup_socket_read         (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> buffer,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> len,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> *nread);</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 href="SoupSocket.html#soup-socket-read"><code class="function">soup_socket_read()</code></a> will return
<a 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.
</p>
<p>
If <em class="parameter"><code>sock</code></em> is non-blocking, and no data is available, the return
value will be <a 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 <code class="literal">readable</code> signal to know when there is more data
to read. (NB: You MUST read all available data off the socket
first. The <code class="literal">readable</code> signal will only be emitted after
<a href="SoupSocket.html#soup-socket-read"><code class="function">soup_socket_read()</code></a> has returned <a href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</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>sock</code></em> :</span></td>
<td> the socket
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>buffer</code></em> :</span></td>
<td> buffer to read into
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>len</code></em> :</span></td>
<td> size of <em class="parameter"><code>buffer</code></em> in bytes
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>nread</code></em> :</span></td>
<td> on return, the number of bytes read into <em class="parameter"><code>buffer</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a <a href="SoupSocket.html#SoupSocketIOStatus"><span class="type">SoupSocketIOStatus</span></a>, as described above (or
<a href="SoupSocket.html#SOUP-SOCKET-EOF:CAPS"><code class="literal">SOUP_SOCKET_EOF</code></a> if the socket is no longer connected, or
<a href="SoupSocket.html#SOUP-SOCKET-ERROR:CAPS"><code class="literal">SOUP_SOCKET_ERROR</code></a> on any other error).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id407192"></a><h3>
<a name="soup-socket-read-until"></a>soup_socket_read_until ()</h3>
<a class="indexterm" name="id407204"></a><pre class="programlisting"><a href="SoupSocket.html#SoupSocketIOStatus">SoupSocketIOStatus</a> soup_socket_read_until   (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> buffer,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> len,
                                             <a
href="../glib/glib-Basic-Types.html#gconstpointer"
>gconstpointer</a> boundary,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> boundary_len,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> *nread,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> *got_boundary);</pre>
<p>
Like <a href="SoupSocket.html#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="../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>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>sock</code></em> :</span></td>
<td> the socket
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>buffer</code></em> :</span></td>
<td> buffer to read into
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>len</code></em> :</span></td>
<td> size of <em class="parameter"><code>buffer</code></em> in bytes
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>boundary</code></em> :</span></td>
<td> boundary to read until
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>boundary_len</code></em> :</span></td>
<td> length of <em class="parameter"><code>boundary</code></em> in bytes
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>nread</code></em> :</span></td>
<td> on return, the number of bytes read into <em class="parameter"><code>buffer</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>got_boundary</code></em> :</span></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>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> as for <a href="SoupSocket.html#soup-socket-read"><code class="function">soup_socket_read()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id407446"></a><h3>
<a name="soup-socket-write"></a>soup_socket_write ()</h3>
<a class="indexterm" name="id407457"></a><pre class="programlisting"><a href="SoupSocket.html#SoupSocketIOStatus">SoupSocketIOStatus</a> soup_socket_write        (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                             <a
href="../glib/glib-Basic-Types.html#gconstpointer"
>gconstpointer</a> buffer,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> len,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> *nwrote);</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 resturn status will be
<code class="literal">SOUP_SOCKET_SUCCESS</code>, and *<em class="parameter"><code>nwrote</code></em> will contain the number of bytes
actually written.
</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 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 <code class="literal">writable</code> signal to know when more
data can be written. (NB: <code class="literal">writable</code> is only emitted after a
<a href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</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>sock</code></em> :</span></td>
<td> the socket
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>buffer</code></em> :</span></td>
<td> data to write
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>len</code></em> :</span></td>
<td> size of <em class="parameter"><code>buffer</code></em>, in bytes
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>nwrote</code></em> :</span></td>
<td> on return, number of bytes written
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a <a href="SoupSocket.html#SoupSocketIOStatus"><span class="type">SoupSocketIOStatus</span></a>, as described above (or
<a href="SoupSocket.html#SOUP-SOCKET-EOF:CAPS"><code class="literal">SOUP_SOCKET_EOF</code></a> or <a 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" lang="en">
<a name="id407685"></a><h3>
<a name="SOUP-SOCKET-FLAG-NONBLOCKING:CAPS"></a>SOUP_SOCKET_FLAG_NONBLOCKING</h3>
<a class="indexterm" name="id407697"></a><pre class="programlisting">#define SOUP_SOCKET_FLAG_NONBLOCKING "non-blocking"
</pre>
<p>
An alias for the "non-blocking" property.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id407712"></a><h3>
<a name="SOUP-SOCKET-FLAG-NODELAY:CAPS"></a>SOUP_SOCKET_FLAG_NODELAY</h3>
<a class="indexterm" name="id407723"></a><pre class="programlisting">#define SOUP_SOCKET_FLAG_NODELAY     "nodelay"
</pre>
<p>
An alias for the "nodelay" property.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id407738"></a><h3>
<a name="SOUP-SOCKET-FLAG-REUSEADDR:CAPS"></a>SOUP_SOCKET_FLAG_REUSEADDR</h3>
<a class="indexterm" name="id407750"></a><pre class="programlisting">#define SOUP_SOCKET_FLAG_REUSEADDR   "reuseaddr"
</pre>
<p>
An alias for the "reuseaddr" property.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id407765"></a><h3>
<a name="SOUP-SOCKET-FLAG-CLOEXEC:CAPS"></a>SOUP_SOCKET_FLAG_CLOEXEC</h3>
<a class="indexterm" name="id407776"></a><pre class="programlisting">#define SOUP_SOCKET_FLAG_CLOEXEC     "cloexec"
</pre>
<p>
An alias for the "cloexec" property.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id407791"></a><h3>
<a name="SOUP-SOCKET-TIMEOUT:CAPS"></a>SOUP_SOCKET_TIMEOUT</h3>
<a class="indexterm" name="id407803"></a><pre class="programlisting">#define SOUP_SOCKET_TIMEOUT	     "timeout"
</pre>
<p>
An alias for the "timeout" property.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id407818"></a><h3>
<a name="SOUP-SOCKET-IS-SERVER:CAPS"></a>SOUP_SOCKET_IS_SERVER</h3>
<a class="indexterm" name="id407829"></a><pre class="programlisting">#define SOUP_SOCKET_IS_SERVER        "is-server"
</pre>
<p>
An alias for the "is-server" property.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id407844"></a><h3>
<a name="SOUP-SOCKET-SSL-CREDENTIALS:CAPS"></a>SOUP_SOCKET_SSL_CREDENTIALS</h3>
<a class="indexterm" name="id407858"></a><pre class="programlisting">#define SOUP_SOCKET_SSL_CREDENTIALS  "ssl-creds"
</pre>
<p>
An alias for the "ssl-creds" property.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id407875"></a><h3>
<a name="SOUP-SOCKET-ASYNC-CONTEXT:CAPS"></a>SOUP_SOCKET_ASYNC_CONTEXT</h3>
<a class="indexterm" name="id407889"></a><pre class="programlisting">#define SOUP_SOCKET_ASYNC_CONTEXT    "async-context"
</pre>
<p>
An alias for the "async-context" property.
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id407908"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="id407920"></a><h3>
<a name="SoupSocket--async-context"></a>The "<code class="literal">async-context</code>" property</h3>
<a class="indexterm" name="id407937"></a><pre class="programlisting">  "async-context"        <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>              : Read / Write / Construct Only</pre>
<p>The GMainContext to dispatch this socket's async I/O in.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id407961"></a><h3>
<a name="SoupSocket--cloexec"></a>The "<code class="literal">cloexec</code>" property</h3>
<a class="indexterm" name="id407978"></a><pre class="programlisting">  "cloexec"              <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write</pre>
<p>Whether or not the socket will be closed automatically on exec().</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id408006"></a><h3>
<a name="SoupSocket--is-server"></a>The "<code class="literal">is-server</code>" property</h3>
<a class="indexterm" name="id408023"></a><pre class="programlisting">  "is-server"            <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read</pre>
<p>Whether or not the socket is a server socket.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id408051"></a><h3>
<a name="SoupSocket--nodelay"></a>The "<code class="literal">nodelay</code>" property</h3>
<a class="indexterm" name="id408067"></a><pre class="programlisting">  "nodelay"              <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write</pre>
<p>Whether or not the socket uses TCP NODELAY.</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id408096"></a><h3>
<a name="SoupSocket--non-blocking"></a>The "<code class="literal">non-blocking</code>" property</h3>
<a class="indexterm" name="id408112"></a><pre class="programlisting">  "non-blocking"         <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write</pre>
<p>Whether or not the socket uses non-blocking I/O.</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id408140"></a><h3>
<a name="SoupSocket--reuseaddr"></a>The "<code class="literal">reuseaddr</code>" property</h3>
<a class="indexterm" name="id408157"></a><pre class="programlisting">  "reuseaddr"            <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write</pre>
<p>Whether or not the socket uses the TCP REUSEADDR flag.</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id408185"></a><h3>
<a name="SoupSocket--ssl-creds"></a>The "<code class="literal">ssl-creds</code>" property</h3>
<a class="indexterm" name="id408202"></a><pre class="programlisting">  "ssl-creds"            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>              : Read / Write</pre>
<p>SSL credential information, passed from the session to the SSL implementation.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id408226"></a><h3>
<a name="SoupSocket--timeout"></a>The "<code class="literal">timeout</code>" property</h3>
<a class="indexterm" name="id408243"></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="id408273"></a><h2>Signal Details</h2>
<div class="refsect2" lang="en">
<a name="id408284"></a><h3>
<a name="SoupSocket-connect-result"></a>The "connect-result" signal</h3>
<a class="indexterm" name="id408295"></a><pre class="programlisting">void        user_function                  (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                            <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="SoupSocket.html#soup-socket-client-new-async"><code class="function">soup_socket_client_new_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>sock</code></em> :</span></td>
<td> the socket
</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="id408404"></a><h3>
<a name="SoupSocket-disconnected"></a>The "disconnected" signal</h3>
<a class="indexterm" name="id408414"></a><pre class="programlisting">void        user_function                  (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    user_data)      : Run last</pre>
<p>
Emitted when the 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>sock</code></em> :</span></td>
<td> the socket
</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="id408490"></a><h3>
<a name="SoupSocket-new-connection"></a>The "new-connection" signal</h3>
<a class="indexterm" name="id408500"></a><pre class="programlisting">void        user_function                  (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                            <a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *new,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    user_data)      : Run first</pre>
<p>
Emitted when a listening socket (set up with
<a href="SoupSocket.html#soup-socket-listen"><code class="function">soup_socket_listen()</code></a> or <a href="SoupSocket.html#soup-socket-server-new"><code class="function">soup_socket_server_new()</code></a>) receives a
new connection.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>sock</code></em> :</span></td>
<td> the socket
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>new</code></em> :</span></td>
<td> the new socket
</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="id408619"></a><h3>
<a name="SoupSocket-readable"></a>The "readable" signal</h3>
<a class="indexterm" name="id408629"></a><pre class="programlisting">void        user_function                  (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    user_data)      : Run last</pre>
<p>
Emitted when an async socket is readable. See
<a href="SoupSocket.html#soup-socket-read"><code class="function">soup_socket_read()</code></a> and <a href="SoupSocket.html#soup-socket-read-until"><code class="function">soup_socket_read_until()</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>sock</code></em> :</span></td>
<td> the socket
</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="id408725"></a><h3>
<a name="SoupSocket-writable"></a>The "writable" signal</h3>
<a class="indexterm" name="id408734"></a><pre class="programlisting">void        user_function                  (<a href="SoupSocket.html" title="SoupSocket">SoupSocket</a> *sock,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    user_data)      : Run last</pre>
<p>
Emitted when an async socket is writable. See
<a href="SoupSocket.html#soup-socket-write"><code class="function">soup_socket_write()</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>sock</code></em> :</span></td>
<td> the socket
</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>
 |