| Qore Programming Language Reference Manual 2.2.0

Loading...
Searching...
No Matches
QC_Socket.dox.h
1
2 namespace Qore {
4
6 struct SseMessageInfo {
8 string comment;
10
12 auto data;
14 string event;
16 auto id;
18 int retry;
19};
20}
22 namespace Qore {
24
26 struct SocketPollInfo {
28
30 int events;
32 Qore::AbstractPollableIoObject socket;
33};
34}
35
37 namespace Qore {
39
172 class Socket : public AbstractPollableIoObjectBase {
173
174 public:
176
191 Socket accept();
192
193 public:
195
211*Socket accept(timeout timeout_ms);
212
213 public:
215
231 acceptAllCertificates(bool accept_all = True);
232
233 public:
235
252 Socket acceptSSL();
253
254 public:
256
272*Socket acceptSSL(timeout timeout_ms);
273
274 public:
276
296 int bind(string str, softbool reuseaddr = False);
297
298 public:
300
314 int bind(int port, softbool reuseaddr = False);
315
316 public:
318
346nothing bindINET(*string iface, *softstring service, softbool reuseaddr = False, softint family = AF_UNSPEC, softint socktype = SOCK_STREAM, softint protocol = 0);
347
348 public:
350
366nothing bindUNIX(string path, softint socktype = SOCK_STREAM, softint protocol = 0);
367
368 public:
370
383 bool captureRemoteCertificates(bool set = True);
384
385 public:
387
396 clearStats();
397
398 public:
400
409nothing clearWarningQueue();
410
411 public:
413
426 int close();
427
428 public:
430
468nothing connect(string target, timeout timeout_ms = -1);
469
470 public:
472
496nothing connectINET(string host, softstring service, timeout timeout_ms = -1, softint family = AF_UNSPEC, softint socktype = SOCK_STREAM, softint protocol = 0);
497
498 public:
500
525nothing connectINETSSL(string host, softstring service, timeout timeout_ms = -1, softint family = AF_UNSPEC, softint socktype = SOCK_STREAM, softint protocol = 0);
526
527 public:
529
557nothing connectSSL(string target, timeout timeout_ms = -1);
558
559 public:
561
580nothing connectUNIX(string path, softint socktype = SOCK_STREAM, softint protocol = 0);
581
582 public:
584
604nothing connectUNIXSSL(string path, softint socktype = SOCK_STREAM, softint protocol = 0);
605
606 public:
608
611 constructor();
612
613 public:
615
618 copy();
619
620 public:
622/***/
623 destructor();
624
625 public:
627
644 bool getAcceptAllCertificates();
645
646 public:
648
654 string getCharset();
655
656 public:
658
672 int getConnectionId();
673
674 public:
676
681 string getEncoding();
682
683 public:
685
697 bool getNoDelay();
698
699 public:
701
717 hash<auto> getPeerInfo(bool host_lookup = True);
718
719 public:
721
731 int getPort();
732
733 public:
735
745 int getRecvTimeout();
746
747 public:
749
760*SSLCertificate getRemoteCertificate();
761
762 public:
764
775*string getSSLCipherName();
776
777 public:
779
790*string getSSLCipherVersion();
791
792 public:
794
804 int getSendTimeout();
805
806 public:
808
818 int getSocket();
819
820 public:
822
838 hash<auto> getSocketInfo(bool host_lookup = True);
839
840 public:
842
859 int getSslVerifyMode();
860
861 public:
863
884 hash<auto> getUsageInfo();
885
886 public:
888
906 bool isDataAvailable(timeout timeout_ms = 0);
907
908 public:
910
920 bool isOpen();
921
922 public:
924
934 bool isSecure();
935
936 public:
938
955 bool isWriteFinished(timeout timeout_ms = 0);
956
957 public:
959
972 int listen(int backlog = 20);
973
974 public:
976
983 bool pendingHttpChunkedBody();
984
985 public:
987
1013 hash<auto> readHTTPChunk(timeout timeout_ms = -1);
1014
1015 public:
1017
1038 hash<auto> readHTTPChunkedBody(timeout timeout_ms = -1);
1039
1040 public:
1042
1063 hash<auto> readHTTPChunkedBodyBinary(timeout timeout_ms = -1);
1064
1065 public:
1067
1099 readHTTPChunkedBodyBinaryWithCallback(code rcb, timeout timeout_ms = -1);
1100
1101 public:
1103
1125 hash<auto> readHTTPChunkedBodyToOutputStream(Qore::OutputStream os, timeout timeout_ms = -1);
1126
1127 public:
1129
1157 readHTTPChunkedBodyWithCallback(code rcb, timeout timeout_ms = -1);
1158
1159 public:
1161
1208 hash<auto> readHTTPHeader(timeout timeout_ms = -1, *reference<hash<auto>> info);
1209
1210 public:
1212
1235 string readHTTPHeaderString(timeout timeout_ms = -1);
1236
1237 public:
1239
1254 hash<SseMessageInfo> readServerSentEvent(*string content_encoding, timeout timeout_ms = -1);
1255
1256 public:
1258
1272 hash<SseMessageInfo> readServerSentEvent(timeout timeout_ms = -1);
1273
1274 public:
1276
1301 string recv(softint size = 0, timeout timeout_ms = -1);
1302
1303 public:
1305
1328 binary recvBinary(softint size = 0, timeout timeout_ms = -1);
1329
1330 public:
1332
1355nothing recvToOutputStream(Qore::OutputStream os, softint size = -1, timeout timeout_ms = -1);
1356
1357 public:
1359
1381 int recvi1(timeout timeout_ms = -1);
1382
1383 public:
1385
1407 int recvi2(timeout timeout_ms = -1);
1408
1409 public:
1411
1433 int recvi2LSB(timeout timeout_ms = -1);
1434
1435 public:
1437
1464 int recvi4(timeout timeout_ms = -1);
1465
1466 public:
1468
1490 int recvi4LSB(timeout timeout_ms = -1);
1491
1492 public:
1494
1516 int recvi8(timeout timeout_ms = -1);
1517
1518 public:
1520
1542 int recvi8LSB(timeout timeout_ms = -1);
1543
1544 public:
1546
1568 int recvu1(timeout timeout_ms = -1);
1569
1570 public:
1572
1594 int recvu2(timeout timeout_ms = -1);
1595
1596 public:
1598
1620 int recvu2LSB(timeout timeout_ms = -1);
1621
1622 public:
1624
1646 int recvu4(timeout timeout_ms = -1);
1647
1648 public:
1650
1672 int recvu4LSB(timeout timeout_ms = -1);
1673
1674 public:
1676
1702 int send(binary bin, timeout timeout_ms = -1);
1703
1704 public:
1706
1734 int send(string str, timeout timeout_ms = -1);
1735
1736 public:
1738
1761nothing send2(binary bin, timeout timeout_ms = -1);
1762
1763 public:
1765
1790nothing send2(string str, timeout timeout_ms = -1);
1791
1792 public:
1794
1819 int sendBinary(string str, timeout timeout_ms = -1);
1820
1821 public:
1823
1848 int sendBinary(binary bin, timeout timeout_ms = -1);
1849
1850 public:
1852
1874nothing sendBinary2(string str, timeout timeout_ms = -1);
1875
1876 public:
1878
1900nothing sendBinary2(binary bin, timeout timeout_ms = -1);
1901
1902 public:
1904
1925nothing sendFromInputStream(Qore::InputStream input_stream, softint size = -1, timeout timeout_ms = -1);
1926
1927 public:
1929
1960nothing sendHTTPChunkedBodyFromInputStream(Qore::InputStream input_stream, int max_chunk_size = 4096, timeout timeout_ms = -1, *code tcb);
1961
1962 public:
1964
1987nothing sendHTTPChunkedBodyTrailer(*hash<auto> trailer, timeout timeout_ms = -1);
1988
1989 public:
1991
2026nothing sendHTTPMessage(string method, string path, string http_version, hash<auto> headers, string body, *reference<hash> info, timeout timeout_ms = -1);
2027
2028 public:
2030
2062nothing sendHTTPMessage(string method, string path, string http_version, hash<auto> headers, *binary body, *reference<hash<auto>> info, timeout timeout_ms = -1);
2063
2064 public:
2066
2094nothing sendHTTPMessageWithCallback(code scb, string method, string path, string http_version, hash<auto> headers, *reference<hash<auto>> info, timeout timeout_ms = -1);
2095
2096 public:
2098
2122nothing sendHTTPResponse(softint status_code, string status_desc, string http_version, hash<auto> headers, string body, timeout timeout_ms = -1);
2123
2124 public:
2126
2164nothing sendHTTPResponse(softint status_code, string status_desc, string http_version, hash<auto> headers, string body, *reference<hash<auto>> info, timeout timeout_ms = -1);
2165
2166 public:
2168
2197nothing sendHTTPResponse(softint status_code, string status_desc, string http_version, hash<auto> headers, *binary body, timeout timeout_ms = -1);
2198
2199 public:
2201
2235nothing sendHTTPResponse(softint status_code, string status_desc, string http_version, hash<auto> headers, *binary body, *reference<hash<auto>> info, timeout timeout_ms = -1);
2236
2237 public:
2239
2281nothing sendHTTPResponse(softint status_code, string status_desc, string http_version, hash<auto> headers, Qore::InputStream input_stream, int max_chunk_size = 4096, *reference<hash<auto>> info, timeout timeout_ms = -1, *code tcb);
2282
2283 public:
2285
2320nothing sendHTTPResponseWithCallback(code scb, softint status_code, string status_desc, string http_version, hash<auto> headers, timeout timeout_ms = -1);
2321
2322 public:
2324
2362nothing sendHTTPResponseWithCallback(code scb, softint status_code, string status_desc, string http_version, hash<auto> headers, *reference<hash<auto>> info, timeout timeout_ms = -1);
2363
2364 public:
2366
2389 int sendi1(softint i = 0, timeout timeout_ms = -1);
2390
2391 public:
2393
2416 int sendi2(softint i = 0, timeout timeout_ms = -1);
2417
2418 public:
2420
2443 int sendi2LSB(softint i = 0, timeout timeout_ms = -1);
2444
2445 public:
2447
2470 int sendi4(softint i = 0, timeout timeout_ms = -1);
2471
2472 public:
2474
2497 int sendi4LSB(softint i = 0, timeout timeout_ms = -1);
2498
2499 public:
2501
2524 int sendi8(softint i = 0, timeout timeout_ms = -1);
2525
2526 public:
2528
2551 int sendi8LSB(softint i = 0, timeout timeout_ms = -1);
2552
2553 public:
2555
2562nothing setCertificate(SSLCertificate cert);
2563
2564 public:
2566
2573nothing setCertificate(string cert_pem);
2574
2575 public:
2577
2584nothing setCertificate(binary cert_der);
2585
2586 public:
2588
2598nothing setCertificateAndPrivateKey(SSLCertificate cert, SSLPrivateKey key);
2599
2600 public:
2602
2605nothing setCharset(string encoding);
2606
2607 public:
2609
2611nothing setEncoding(string encoding);
2612
2613 public:
2615
2622nothing setEventQueue();
2623
2624 public:
2626
2642nothing setEventQueue(Qore::Thread::Queue queue, auto arg, *bool with_data);
2643
2644 public:
2646
2664 int setNoDelay(bool nd = True);
2665
2666 public:
2668
2675nothing setPrivateKey(SSLPrivateKey key);
2676
2677 public:
2679
2687nothing setPrivateKey(string key_pem, *string pass);
2688
2689 public:
2691
2698nothing setPrivateKey(binary key_der);
2699
2700 public:
2702
2716 int setRecvTimeout(timeout timeout_ms);
2717
2718 public:
2720
2732 int setSendTimeout(timeout timeout_ms);
2733
2734 public:
2736
2753 setSslVerifyMode(int mode);
2754
2755 public:
2757
2789nothing setWarningQueue(int warning_ms, int warning_bs, Queue queue, auto arg, timeout min_ms = 1s);
2790
2791 public:
2793
2803 int shutdown();
2804
2805 public:
2807
2816nothing shutdownSSL();
2817
2818 public:
2820
2829 AbstractPollOperation startPollAccept();
2830
2831 public:
2833
2840 AbstractPollOperation startPollConnect(string target);
2841
2842 public:
2844
2853 AbstractPollOperation startPollConnectSsl(string target);
2854
2855 public:
2857
2885 AbstractPollOperation startPollReadHttpHeader();
2886
2887 public:
2889
2898 AbstractPollOperation startPollRecvBinary(int size);
2899
2900 public:
2902
2910 AbstractPollOperation startPollRecvData();
2911
2912 public:
2914
2923 AbstractPollOperation startPollRecvString(int size);
2924
2925 public:
2927
2936 AbstractPollOperation startPollRecvUntilBytesBinary(string pattern);
2937
2938 public:
2940
2949 AbstractPollOperation startPollRecvUntilBytesString(string pattern);
2950
2951 public:
2953
2959 AbstractPollOperation startPollSend(string data);
2960
2961 public:
2963
2969 AbstractPollOperation startPollSend(binary data);
2970
2971 public:
2973
2981 AbstractPollOperation startPollUpgradeClientToSSL();
2982
2983 public:
2985
2993 AbstractPollOperation startPollUpgradeServerToSSL();
2994
2995 public:
2997
3011nothing upgradeClientToSSL(timeout timeout_ms = -1);
3012
3013 public:
3015
3029nothing upgradeServerToSSL(timeout timeout_ms = -1);
3030
3031 public:
3033
3043*string verifyPeerCertificate();
3044
3045 public:
3047
3051 static hash<SseMessageInfo> parseServerSentEvent(string str);
3052
3053 public:
3055
3086 static list<hash<SocketPollInfo>> poll(list<hash<SocketPollInfo>> items, timeout timeout_ms);
3087};
3088
3091
3093 const SOCK_POLLERR = SOCK_POLLERR;
3095 const SOCK_POLLIN = SOCK_POLLIN;
3097 const SOCK_POLLOUT = SOCK_POLLOUT;
3099
3104
3106
3116 const SSL_VERIFY_CLIENT_ONCE = SSL_VERIFY_CLIENT_ONCE;
3118
3128 const SSL_VERIFY_FAIL_IF_NO_PEER_CERT = SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
3130
3137 const SSL_VERIFY_NONE = SSL_VERIFY_NONE;
3139
3154 const SSL_VERIFY_PEER = SSL_VERIFY_PEER;
3156
3163
3165 const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH = "X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH";
3167 const X509_V_ERR_AKID_SKID_MISMATCH = "X509_V_ERR_AKID_SKID_MISMATCH";
3169 const X509_V_ERR_APPLICATION_VERIFICATION = "X509_V_ERR_APPLICATION_VERIFICATION";
3171 const X509_V_ERR_CERT_CHAIN_TOO_LONG = "X509_V_ERR_CERT_CHAIN_TOO_LONG";
3173 const X509_V_ERR_CERT_HAS_EXPIRED = "X509_V_ERR_CERT_HAS_EXPIRED";
3175 const X509_V_ERR_CERT_NOT_YET_VALID = "X509_V_ERR_CERT_NOT_YET_VALID";
3177 const X509_V_ERR_CERT_REJECTED = "X509_V_ERR_CERT_REJECTED";
3179 const X509_V_ERR_CERT_REVOKED = "X509_V_ERR_CERT_REVOKED";
3181 const X509_V_ERR_CERT_SIGNATURE_FAILURE = "X509_V_ERR_CERT_SIGNATURE_FAILURE";
3183 const X509_V_ERR_CERT_UNTRUSTED = "X509_V_ERR_CERT_UNTRUSTED";
3185 const X509_V_ERR_CRL_HAS_EXPIRED = "X509_V_ERR_CRL_HAS_EXPIRED";
3187 const X509_V_ERR_CRL_NOT_YET_VALID = "X509_V_ERR_CRL_NOT_YET_VALID";
3189 const X509_V_ERR_CRL_SIGNATURE_FAILURE = "X509_V_ERR_CRL_SIGNATURE_FAILURE";
3191 const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT = "X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT";
3193 const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD = "X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD";
3195 const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD = "X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD";
3197 const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD = "X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD";
3199 const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD = "X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD";
3201 const X509_V_ERR_INVALID_CA = "X509_V_ERR_INVALID_CA";
3203 const X509_V_ERR_INVALID_PURPOSE = "X509_V_ERR_INVALID_PURPOSE";
3205 const X509_V_ERR_KEYUSAGE_NO_CERTSIGN = "X509_V_ERR_KEYUSAGE_NO_CERTSIGN";
3207 const X509_V_ERR_OUT_OF_MEM = "X509_V_ERR_OUT_OF_MEM";
3209 const X509_V_ERR_PATH_LENGTH_EXCEEDED = "X509_V_ERR_PATH_LENGTH_EXCEEDED";
3211 const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN = "X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN";
3213 const X509_V_ERR_SUBJECT_ISSUER_MISMATCH = "X509_V_ERR_SUBJECT_ISSUER_MISMATCH";
3215 const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY = "X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY";
3217 const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE = "X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE";
3219 const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE = "X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE";
3221 const X509_V_ERR_UNABLE_TO_GET_CRL = "X509_V_ERR_UNABLE_TO_GET_CRL";
3223 const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT = "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT";
3225 const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY = "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY";
3227 const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE = "X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE";
3229 const X509_V_OK = "X509_V_OK";
3231 const X509_VerificationReasons = (
3232 "X509_V_OK": "OK",
3233 "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT": "Unable to get issuer certificate",
3234 "X509_V_ERR_UNABLE_TO_GET_CRL": "Unable to get certificate CRL",
3235 "X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE": "Unable to decrypt certificate's signature. This means that the actual signature value could not be determined rather than it not matching the expected value; this is only meaningful for RSA",
3236 "X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE": "Unable to decrypt CRL's signature",
3237 "X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY": "Unable to decode issuer public key (SubjectPublicKeyInfo)",
3238 "X509_V_ERR_CERT_SIGNATURE_FAILURE": "Certificate signature failure; the signature of the certificate is invalid",
3239 "X509_V_ERR_CRL_SIGNATURE_FAILURE": "CRL signature failure; the signature of the certificate is invalid",
3240 "X509_V_ERR_CERT_NOT_YET_VALID": "Certificate is not yet valid",
3241 "X509_V_ERR_CERT_HAS_EXPIRED": "Certificate has expired",
3242 "X509_V_ERR_CRL_NOT_YET_VALID": "CRL is not yet valid",
3243 "X509_V_ERR_CRL_HAS_EXPIRED": "CRL has expired",
3244 "X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD": "Format error in certificate's notBefore field (invalid time)",
3245 "X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD": "Format error in certificate's notAfter field (invalid time)",
3246 "X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD": "Format error in CRL's lastUpdate field (invalid time)",
3247 "X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD": "Format error in CRL's nextUpdate field (invalid time)",
3248 "X509_V_ERR_OUT_OF_MEM": "Out of memory error",
3249 "X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT": "Certificate is self-signed and cannot be found in the trusted list",
3250 "X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN": "Self signed certificate in certificate chain",
3251 "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY": "Unable to get local issuer certificate. This normally means the list of trusted certificates is not complete",
3252 "X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE": "Unable to verify the first certificate",
3253 "X509_V_ERR_CERT_CHAIN_TOO_LONG": "Certificate chain too long",
3254 "X509_V_ERR_CERT_REVOKED": "Certificate has been revoked",
3255 "X509_V_ERR_INVALID_CA": "Invalid CA certificate",
3256 "X509_V_ERR_PATH_LENGTH_EXCEEDED": "The basicConstraints pathlength parameter has been exceeded",
3257 "X509_V_ERR_INVALID_PURPOSE": "The certificate cannot be used for the specified purpose",
3258 "X509_V_ERR_CERT_UNTRUSTED": "Root CA is not marked as trusted for the specified purpose",
3259 "X509_V_ERR_CERT_REJECTED": "Root CA is marked to reject the specified purpose",
3260 "X509_V_ERR_SUBJECT_ISSUER_MISMATCH": "The current candidate issuer certificate was rejected because its subject name did not match the issuer name of the current certificate",
3261 "X509_V_ERR_AKID_SKID_MISMATCH": "The current candidate issuer certificate was rejected because its subject key identifier was present and did not match the authority key identifier of the current certificate",
3262 "X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH": "Issuer name and serial number of candidate certificate do not match the authority key identifier of the current certificate",
3263 "X509_V_ERR_KEYUSAGE_NO_CERTSIGN": "The keyUsage extension does not permit certificate signing",
3264 "X509_V_ERR_APPLICATION_VERIFICATION": "Verification failure",
3265);
3267
3271
3273 const AFMap = qore(get_network_address_family_map());
3275 const AFStrMap = (
3276 "AF_INET": AF_INET,
3277 "AF_INET6": AF_INET6,
3278 "AF_UNIX": AF_UNIX,
3279 "AF_LOCAL": AF_UNIX,
3280 "AF_UNSPEC": AF_UNSPEC,
3281);
3283 const AF_INET = AF_INET;
3285 const AF_INET6 = AF_INET6;
3287 const AF_LOCAL = AF_LOCAL;
3289 const AF_UNIX = AF_UNIX;
3291 const AF_UNSPEC = AF_UNSPEC;
3293
3298
3300 const AI_ADDRCONFIG = AI_ADDRCONFIG;
3302 const AI_ALL = AI_ALL;
3304 const AI_CANONNAME = AI_CANONNAME;
3306 const AI_NUMERICHOST = AI_NUMERICHOST;
3308
3313 const AI_NUMERICSERV = AI_NUMERICSERV;
3315
3324 const AI_PASSIVE = AI_PASSIVE;
3326
3328 const AI_V4MAPPED = AI_V4MAPPED;
3330
3334
3336 const IPPROTO_TCP = IPPROTO_TCP;
3338 const IPPROTO_UDP = IPPROTO_UDP;
3340
3344
3346 const SOCK_DGRAM = SOCK_DGRAM;
3348 const SOCK_RAW = SOCK_RAW;
3350 const SOCK_STREAM = SOCK_STREAM;
3352}
Qore::AbstractPollOperation
Abstract poll operation objects provide the polling interface for pollable objects.
Definition QC_AbstractPollOperation.dox.h:6
Qore::AbstractPollableIoObjectBase
Interface for builtin classes that support I/O polling.
Definition QC_AbstractPollableIoObjectBase.dox.h:8
Qore::AbstractPollableIoObject
This interfaces declares that the inheriting class supports a pollable file descriptor.
Definition QC_AbstractPollableIoObject.dox.h:6
Qore::InputStream
This class defines an abstract interface for input streams.
Definition QC_InputStream.dox.h:19
Qore::OutputStream
This class defines an abstract interface for output streams.
Definition QC_OutputStream.dox.h:18
Qore::SSLCertificate
SSLCertificate objects allow Qore code to work with X.509 certificate data.
Definition QC_SSLCertificate.dox.h:10
Qore::SSLPrivateKey
This class implements a container for private key data.
Definition QC_SSLPrivateKey.dox.h:10
Qore::Socket
The Socket class allows Qore programs safe access to network sockets.
Definition QC_Socket.dox.h:172
Qore::Socket::sendi2LSB
int sendi2LSB(softint i=0, timeout timeout_ms=-1)
Sends a 2-byte (16-bit) integer in little-endian format over the socket.
Qore::Socket::send2
nothing send2(string str, timeout timeout_ms=-1)
Sends string data over the socket; string data is converted to the socket's encoding if necessary; if...
Qore::Socket::getSendTimeout
int getSendTimeout()
Returns the send timeout socket option value as an integer in milliseconds.
Qore::Socket::readHTTPChunkedBodyBinary
hash< auto > readHTTPChunkedBodyBinary(timeout timeout_ms=-1)
Reads in an HTTP message body sent in chunked transfer encoding and returns it with any footers recei...
Qore::Socket::sendBinary
int sendBinary(binary bin, timeout timeout_ms=-1)
Sends binary data over the socket; if any errors occur, an exception is thrown.
Qore::Socket::sendHTTPMessage
nothing sendHTTPMessage(string method, string path, string http_version, hash< auto > headers, *binary body, *reference< hash< auto > > info, timeout timeout_ms=-1)
Sends an HTTP message with a method and user-defined headers given as a hash and an optional message ...
Qore::Socket::getAcceptAllCertificates
bool getAcceptAllCertificates()
returns the current value of the "accept all certificates" flag
Qore::Socket::sendi1
int sendi1(softint i=0, timeout timeout_ms=-1)
Sends a 1-byte integer over the socket.
Qore::Socket::sendi8LSB
int sendi8LSB(softint i=0, timeout timeout_ms=-1)
Sends an 8-byte (64-bit) integer in little-endian format over the socket.
Qore::Socket::sendHTTPResponse
nothing sendHTTPResponse(softint status_code, string status_desc, string http_version, hash< auto > headers, *binary body, *reference< hash< auto > > info, timeout timeout_ms=-1)
Sends an HTTP response with user-defined headers given as a hash and a message body as literal binary...
Qore::Socket::pendingHttpChunkedBody
bool pendingHttpChunkedBody()
returns True if the socket is still connected, and a HTTP header was read indicating chunked transfer...
Qore::Socket::startPollAccept
AbstractPollOperation startPollAccept()
Returns an AbstractPollOperation object to accept a new connection.
Qore::Socket::captureRemoteCertificates
bool captureRemoteCertificates(bool set=True)
Sets the flag for capturing remote X.509 certificates; by default no capture of remote certificates i...
Qore::Socket::isOpen
bool isOpen()
Returns True if the socket is open.
Qore::Socket::recvu2
int recvu2(timeout timeout_ms=-1)
Receives a 2-byte (16-bit) unsigned integer in big-endian format (network byte order) from the socket...
Qore::Socket::getSocket
int getSocket()
Returns the socket file descriptor number.
Qore::Socket::getSocketInfo
hash< auto > getSocketInfo(bool host_lookup=True)
Returns information about the local socket as a hash.
Qore::Socket::startPollConnectSsl
AbstractPollOperation startPollConnectSsl(string target)
Returns an AbstractPollOperation object to poll the socket for an SSL connection.
Qore::Socket::setRecvTimeout
int setRecvTimeout(timeout timeout_ms)
sets the receive timeout as a socket option
Qore::Socket::accept
Socket accept()
Accepts connections on a listening socket.
Qore::Socket::getNoDelay
bool getNoDelay()
Returns the TCP_NODELAY setting for the socket.
Qore::Socket::connectSSL
nothing connectSSL(string target, timeout timeout_ms=-1)
Connects to a remote socket and attempts to establish a TLS/SSL connection; accepts an optional timeo...
Qore::Socket::sendHTTPResponse
nothing sendHTTPResponse(softint status_code, string status_desc, string http_version, hash< auto > headers, string body, timeout timeout_ms=-1)
Sends an HTTP response with user-defined headers given as a hash and an optional message body.
Qore::Socket::setCertificate
nothing setCertificate(binary cert_der)
Sets the X.509 certificate to use for negotiating encrypted connections from the DER-encoded binary o...
Qore::Socket::sendFromInputStream
nothing sendFromInputStream(Qore::InputStream input_stream, softint size=-1, timeout timeout_ms=-1)
Reads data from an InputStream and sends the bytes over the socket.
Qore::Socket::close
int close()
Closes an open socket.
Qore::Socket::startPollRecvBinary
AbstractPollOperation startPollRecvBinary(int size)
Returns an AbstractPollOperation object to read data in non-blocking mode.
Qore::Socket::getSSLCipherName
*string getSSLCipherName()
Returns the name of the cipher for an encrypted connection or NOTHING if a secure connection has not ...
Qore::Socket::listen
int listen(int backlog=20)
Listens for connections on a bound socket; sets the socket in a listening state.
Qore::Socket::sendHTTPResponseWithCallback
nothing sendHTTPResponseWithCallback(code scb, softint status_code, string status_desc, string http_version, hash< auto > headers, timeout timeout_ms=-1)
Sends an HTTP response with user-defined headers given as a hash and a message body to send with chun...
Qore::Socket::readHTTPChunk
hash< auto > readHTTPChunk(timeout timeout_ms=-1)
Reads in a single HTTP message chunk.
Qore::Socket::poll
static list< hash< SocketPollInfo > > poll(list< hash< SocketPollInfo > > items, timeout timeout_ms)
polls multiple sockets and returns all sockets with events
Qore::Socket::accept
*Socket accept(timeout timeout_ms)
Accepts connections on a listening socket (see Socket::listen()) accepting a timeout value with a mil...
Qore::Socket::getSSLCipherVersion
*string getSSLCipherVersion()
Returns the version string of the cipher for an encrypted connection or NOTHING if a secure connectio...
Qore::Socket::setWarningQueue
nothing setWarningQueue(int warning_ms, int warning_bs, Queue queue, auto arg, timeout min_ms=1s)
Sets a Queue object to receive socket warnings.
Qore::Socket::recvu4LSB
int recvu4LSB(timeout timeout_ms=-1)
Receives a 4-byte (32-bit) unsigned integer in little-endian format from the socket.
Qore::Socket::recvi2
int recvi2(timeout timeout_ms=-1)
Receives a 2-byte (16-bit) signed integer in big-endian format (network byte order) from the socket.
Qore::Socket::getUsageInfo
hash< auto > getUsageInfo()
Returns performance statistics for the socket.
Qore::Socket::isWriteFinished
bool isWriteFinished(timeout timeout_ms=0)
Returns True or False depending on whether all the data has been written to the socket.
Qore::Socket::connectUNIXSSL
nothing connectUNIXSSL(string path, softint socktype=SOCK_STREAM, softint protocol=0)
Connects to the given UNIX domain socket file and attempts to establish a TLS/SSL connection.
Qore::Socket::setCertificateAndPrivateKey
nothing setCertificateAndPrivateKey(SSLCertificate cert, SSLPrivateKey key)
Sets the X.509 certificate and private key in one atomic operation to use for negotiating encrypted c...
Qore::Socket::sendHTTPResponseWithCallback
nothing sendHTTPResponseWithCallback(code scb, softint status_code, string status_desc, string http_version, hash< auto > headers, *reference< hash< auto > > info, timeout timeout_ms=-1)
Sends an HTTP response with user-defined headers given as a hash and a message body to send with chun...
Qore::Socket::verifyPeerCertificate
*string verifyPeerCertificate()
Returns a string code giving the result of verifying the remote certificate or NOTHING if an encrypte...
Qore::Socket::readHTTPChunkedBody
hash< auto > readHTTPChunkedBody(timeout timeout_ms=-1)
Reads in an HTTP message body sent in chunked transfer encoding and returns it with any footers recei...
Qore::Socket::recvi4LSB
int recvi4LSB(timeout timeout_ms=-1)
Receives a 4-byte (32-bit) signed integer in little-endian format from the socket.
Qore::Socket::isSecure
bool isSecure()
Returns True if the connection is a secure TLS/SSL connection.
Qore::Socket::parseServerSentEvent
static hash< SseMessageInfo > parseServerSentEvent(string str)
Parse the given string as a Server Sent Event (SSE) string.
Qore::Socket::startPollUpgradeClientToSSL
AbstractPollOperation startPollUpgradeClientToSSL()
Returns an AbstractPollOperation object to upgrade a connected client socket to SSL.
Qore::Socket::readHTTPChunkedBodyToOutputStream
hash< auto > readHTTPChunkedBodyToOutputStream(Qore::OutputStream os, timeout timeout_ms=-1)
Reads in an HTTP message body sent in chunked transfer encoding, writes it in an OutputStream and ret...
Qore::Socket::sendBinary2
nothing sendBinary2(string str, timeout timeout_ms=-1)
Sends string data over the socket without converting the string to the socket's encoding,...
Qore::Socket::acceptSSL
*Socket acceptSSL(timeout timeout_ms)
Accepts connections on a listening socket and attempts to negotiate a TLS/SSL connection accepting a ...
Qore::Socket::sendi4LSB
int sendi4LSB(softint i=0, timeout timeout_ms=-1)
Sends a 4-byte (32-bit) integer in little-endian format over the socket.
Qore::Socket::getConnectionId
int getConnectionId()
Returns an integer connection ID that is incremented every time the socket is disconnected.
Qore::Socket::connectINETSSL
nothing connectINETSSL(string host, softstring service, timeout timeout_ms=-1, softint family=AF_UNSPEC, softint socktype=SOCK_STREAM, softint protocol=0)
Connects to the given host and port and attempts to establish a TLS/SSL connection; accepts an option...
Qore::Socket::getRemoteCertificate
*SSLCertificate getRemoteCertificate()
Returns any remote certificate captured or NOTHING if there is none.
Qore::Socket::getPeerInfo
hash< auto > getPeerInfo(bool host_lookup=True)
Returns a hash of information about the remote end for connected sockets.
Qore::Socket::getSslVerifyMode
int getSslVerifyMode()
returns the current SSL verification mode
Qore::Socket::startPollConnect
AbstractPollOperation startPollConnect(string target)
Returns an AbstractPollOperation object to poll the socket for a standard connection.
Qore::Socket::connectINET
nothing connectINET(string host, softstring service, timeout timeout_ms=-1, softint family=AF_UNSPEC, softint socktype=SOCK_STREAM, softint protocol=0)
Connects to the given host and port with an optional timeout value with a millisecond resolution.
Qore::Socket::recvi8LSB
int recvi8LSB(timeout timeout_ms=-1)
Receives an 8-byte (64-bit) signed integer in little-endian format from the socket.
Qore::Socket::connect
nothing connect(string target, timeout timeout_ms=-1)
Connects to a remote port (if the string has a format "host:port") or UNIX domain socket file.
Qore::Socket::bind
int bind(int port, softbool reuseaddr=False)
Opens and binds the socket to an INET port on all interfaces.
Qore::Socket::readServerSentEvent
hash< SseMessageInfo > readServerSentEvent(*string content_encoding, timeout timeout_ms=-1)
Read a server sent event message.
Qore::Socket::setPrivateKey
nothing setPrivateKey(string key_pem, *string pass)
Sets the private key to use for negotiating encrypted connections along with the X....
Qore::Socket::upgradeServerToSSL
nothing upgradeServerToSSL(timeout timeout_ms=-1)
Upgrades a server socket connection to a TLS/SSL connection.
Qore::Socket::bind
int bind(string str, softbool reuseaddr=False)
Opens and binds the socket to a port, interface and port (if the bind_to string has a format "host:po...
Qore::Socket::startPollRecvUntilBytesString
AbstractPollOperation startPollRecvUntilBytesString(string pattern)
Returns an AbstractPollOperation object to read data in non-blocking mode.
Qore::Socket::sendHTTPResponse
nothing sendHTTPResponse(softint status_code, string status_desc, string http_version, hash< auto > headers, Qore::InputStream input_stream, int max_chunk_size=4096, *reference< hash< auto > > info, timeout timeout_ms=-1, *code tcb)
Sends an HTTP response with user-defined headers and a message body from an input stream in chunked t...
Qore::Socket::sendBinary2
nothing sendBinary2(binary bin, timeout timeout_ms=-1)
Sends binary data over the socket; if any errors occur, an exception is thrown.
Qore::Socket::sendi8
int sendi8(softint i=0, timeout timeout_ms=-1)
Sends an 8-byte (64-bit) integer in big-endian format (network byte order) over the socket.
Qore::Socket::bindINET
nothing bindINET(*string iface, *softstring service, softbool reuseaddr=False, softint family=AF_UNSPEC, softint socktype=SOCK_STREAM, softint protocol=0)
Opens and binds the socket to the given IPv4 or IPv6 interface (or if no interface is given,...
Qore::Socket::sendi4
int sendi4(softint i=0, timeout timeout_ms=-1)
Sends a 4-byte (32-bit) integer in big-endian format (network byte order) over the socket.
Qore::Socket::startPollSend
AbstractPollOperation startPollSend(binary data)
Returns an AbstractPollOperation object to send data in non-blocking mode.
Qore::Socket::recvToOutputStream
nothing recvToOutputStream(Qore::OutputStream os, softint size=-1, timeout timeout_ms=-1)
Receives data from the socket and writes the bytes to an OutputStream.
Qore::Socket::setCertificate
nothing setCertificate(SSLCertificate cert)
Sets the X.509 certificate to use for negotiating encrypted connections.
Qore::Socket::readHTTPChunkedBodyWithCallback
readHTTPChunkedBodyWithCallback(code rcb, timeout timeout_ms=-1)
Reads in an HTTP message body sent in chunked transfer encoding and returns it with any footers recei...
Qore::Socket::clearWarningQueue
nothing clearWarningQueue()
Removes any warning Queue object from the Socket.
Qore::Socket::recvi1
int recvi1(timeout timeout_ms=-1)
Receives a 1-byte signed integer from the socket.
Qore::Socket::getRecvTimeout
int getRecvTimeout()
Returns the receive timeout socket option value as an integer in milliseconds.
Qore::Socket::setCertificate
nothing setCertificate(string cert_pem)
Sets the X.509 certificate to use for negotiating encrypted connections from the PEM-encoded string r...
Qore::Socket::clearStats
clearStats()
Clears performance statistics.
Qore::Socket::recvu2LSB
int recvu2LSB(timeout timeout_ms=-1)
Receives a 2-byte (16-bit) unsigned integer in little-endian format from the socket.
Qore::Socket::recvBinary
binary recvBinary(softint size=0, timeout timeout_ms=-1)
Receives data from the socket and returns a binary object.
Qore::Socket::send
int send(string str, timeout timeout_ms=-1)
Sends string data over the socket; string data is converted to the socket's encoding if necessary; if...
Qore::Socket::readHTTPChunkedBodyBinaryWithCallback
readHTTPChunkedBodyBinaryWithCallback(code rcb, timeout timeout_ms=-1)
Reads in an HTTP message body sent in chunked transfer encoding and returns it with any footers recei...
Qore::Socket::acceptAllCertificates
acceptAllCertificates(bool accept_all=True)
with peer verification enabled, all certificates are accepted regardless of the validity of the Certi...
Qore::Socket::send
int send(binary bin, timeout timeout_ms=-1)
Sends binary data over the socket; if any errors occur, an exception is thrown.
Qore::Socket::startPollRecvString
AbstractPollOperation startPollRecvString(int size)
Returns an AbstractPollOperation object to read data in non-blocking mode.
Qore::Socket::setPrivateKey
nothing setPrivateKey(binary key_der)
Sets the private key to use for negotiating encrypted connections along with the X....
Qore::Socket::setSendTimeout
int setSendTimeout(timeout timeout_ms)
sets the send timeout as a socket option
Qore::Socket::copy
copy()
Creates a new Socket object, not based on the source being copied.
Qore::Socket::sendi2
int sendi2(softint i=0, timeout timeout_ms=-1)
Sends a 2-byte (16-bit) integer in big-endian format (network byte order) over the socket.
Qore::Socket::startPollUpgradeServerToSSL
AbstractPollOperation startPollUpgradeServerToSSL()
Returns an AbstractPollOperation object to upgrade a connected server socket to SSL.
Qore::Socket::setSslVerifyMode
setSslVerifyMode(int mode)
sets the SSL verification mode
Qore::Socket::shutdown
int shutdown()
Ensures that a socket will be closed even if the file descriptor is shared with other processes (for ...
Qore::Socket::sendHTTPMessageWithCallback
nothing sendHTTPMessageWithCallback(code scb, string method, string path, string http_version, hash< auto > headers, *reference< hash< auto > > info, timeout timeout_ms=-1)
Sends an HTTP message with a method and user-defined headers given as a hash and an optional message ...
Qore::Socket::constructor
constructor()
Creates the socket object.
Qore::Socket::shutdownSSL
nothing shutdownSSL()
Shuts down the SSL connection on a secure connection.
Qore::Socket::startPollRecvUntilBytesBinary
AbstractPollOperation startPollRecvUntilBytesBinary(string pattern)
Returns an AbstractPollOperation object to read data in non-blocking mode.
Qore::Socket::setEventQueue
nothing setEventQueue(Qore::Thread::Queue queue, auto arg, *bool with_data)
Sets a Queue object to receive socket events.
Qore::Socket::recvu1
int recvu1(timeout timeout_ms=-1)
Receives a 1-byte unsigned integer from the socket.
Qore::Socket::send2
nothing send2(binary bin, timeout timeout_ms=-1)
Sends binary data over the socket; if any errors occur, an exception is thrown.
Qore::Socket::startPollSend
AbstractPollOperation startPollSend(string data)
Returns an AbstractPollOperation object to send data in non-blocking mode.
Qore::Socket::readHTTPHeaderString
string readHTTPHeaderString(timeout timeout_ms=-1)
Retuns a string representing the data in the HTTP header read (reads until "\r\n\r\n")
Qore::Socket::recvi4
int recvi4(timeout timeout_ms=-1)
Receives a 4-byte (32-bit) signed integer in big-endian format (network byte order) from the socket.
Qore::Socket::getEncoding
string getEncoding()
Returns the character encoding for the socket.
Qore::Socket::readHTTPHeader
hash< auto > readHTTPHeader(timeout timeout_ms=-1, *reference< hash< auto > > info)
Retuns a hash representing the data in the HTTP header read, or, if the data cannot be parsed as an H...
Qore::Socket::setEventQueue
nothing setEventQueue()
Removes any Queue object from the Socket object so that socket events are no longer added to the Queu...
Qore::Socket::sendHTTPChunkedBodyTrailer
nothing sendHTTPChunkedBodyTrailer(*hash< auto > trailer, timeout timeout_ms=-1)
Sends the trialer of an HTTP message body in chunked transfer encoding.
Qore::Socket::upgradeClientToSSL
nothing upgradeClientToSSL(timeout timeout_ms=-1)
Upgrades a client socket connection to a TLS/SSL connection.
Qore::Socket::setCharset
nothing setCharset(string encoding)
Sets the character encoding for the socket.
Qore::Socket::connectUNIX
nothing connectUNIX(string path, softint socktype=SOCK_STREAM, softint protocol=0)
Connects to a UNIX domain socket file.
Qore::Socket::sendBinary
int sendBinary(string str, timeout timeout_ms=-1)
Sends string data over the socket without converting the string to the socket's encoding,...
Qore::Socket::isDataAvailable
bool isDataAvailable(timeout timeout_ms=0)
Returns True or False depending on whether there is data to be read on the socket.
Qore::Socket::setNoDelay
int setNoDelay(bool nd=True)
Sets the boolean TCP_NODELAY setting for the socket.
Qore::Socket::acceptSSL
Socket acceptSSL()
Accepts connections on a listening socket and attempts to negotiate a TLS/SSL connection.
Qore::Socket::recv
string recv(softint size=0, timeout timeout_ms=-1)
Receives data from the socket and returns a string tagged with the Socket's character encoding.
Qore::Socket::recvu4
int recvu4(timeout timeout_ms=-1)
Receives a 4-byte (32-bit) unsigned integer in big-endian format (network byte order) from the socket...
Qore::Socket::recvi8
int recvi8(timeout timeout_ms=-1)
Receives an 8-byte (64-bit) signed integer in big-endian format (network byte order) from the socket.
Qore::Socket::startPollReadHttpHeader
AbstractPollOperation startPollReadHttpHeader()
Returns an AbstractPollOperation object to read an HTTP header without blocking.
Qore::Socket::sendHTTPMessage
nothing sendHTTPMessage(string method, string path, string http_version, hash< auto > headers, string body, *reference< hash > info, timeout timeout_ms=-1)
Sends an HTTP message with a method and user-defined headers given as a hash and an optional message ...
Qore::Socket::recvi2LSB
int recvi2LSB(timeout timeout_ms=-1)
Receives a 2-byte (16-bit) signed integer in little-endian format from the socket.
Qore::Socket::getPort
int getPort()
Returns the port number of the socket for INET sockets.
Qore::Socket::sendHTTPResponse
nothing sendHTTPResponse(softint status_code, string status_desc, string http_version, hash< auto > headers, *binary body, timeout timeout_ms=-1)
Sends an HTTP response with user-defined headers given as a hash and a message body as literal binary...
Qore::Socket::bindUNIX
nothing bindUNIX(string path, softint socktype=SOCK_STREAM, softint protocol=0)
Opens and binds the socket to the given UNIX domain socket file as given by the filename argument....
Qore::Socket::readServerSentEvent
hash< SseMessageInfo > readServerSentEvent(timeout timeout_ms=-1)
Read a server sent event message.
Qore::Socket::setEncoding
nothing setEncoding(string encoding)
Sets the character encoding for the socket.
Qore::Socket::destructor
destructor()
Deletes the object.
Qore::Socket::setPrivateKey
nothing setPrivateKey(SSLPrivateKey key)
Sets the private key to use for negotiating encrypted connections along with the X....
Qore::Socket::startPollRecvData
AbstractPollOperation startPollRecvData()
Returns an AbstractPollOperation object for receiving data in non-blocking mode.
Qore::Socket::sendHTTPResponse
nothing sendHTTPResponse(softint status_code, string status_desc, string http_version, hash< auto > headers, string body, *reference< hash< auto > > info, timeout timeout_ms=-1)
Sends an HTTP response with user-defined headers given as a hash and an optional message body.
Qore::Socket::sendHTTPChunkedBodyFromInputStream
nothing sendHTTPChunkedBodyFromInputStream(Qore::InputStream input_stream, int max_chunk_size=4096, timeout timeout_ms=-1, *code tcb)
Sends an HTTP message body in chunked transfer encoding.
Qore::Socket::getCharset
string getCharset()
Returns the character encoding for the socket.
Qore::Thread::Queue
Queue objects provide a blocking, thread-safe message-passing object to Qore programs
Definition QC_Queue.dox.h:22
Qore::True
const True
logical True
Definition qc_qore.dox.h:98
Qore::False
const False
logical False
Definition qc_qore.dox.h:96
Qore::AF_LOCAL
const AF_LOCAL
POSIX synonym for AF_UNIX.
Definition QC_Socket.dox.h:3287
Qore::AF_INET6
const AF_INET6
IPv6 address family.
Definition QC_Socket.dox.h:3285
Qore::AF_UNIX
const AF_UNIX
UNIX domain address family (UNIX socket files)
Definition QC_Socket.dox.h:3289
Qore::AFMap
const AFMap
mapping from Network Address Family Constants to string codes
Definition QC_Socket.dox.h:3273
Qore::AF_UNSPEC
const AF_UNSPEC
unspecified address family
Definition QC_Socket.dox.h:3291
Qore::AF_INET
const AF_INET
IPv4 address family.
Definition QC_Socket.dox.h:3283
Qore::AFStrMap
const AFStrMap
mapping from network address family string codes to Network Address Family Constants
Definition QC_Socket.dox.h:3275
Qore::AI_NUMERICHOST
const AI_NUMERICHOST
If this bit is set, then the host is assumed to be an address and no hostname lookup will be preforme...
Definition QC_Socket.dox.h:3306
Qore::AI_ADDRCONFIG
const AI_ADDRCONFIG
if this bit is set, addresses of each family are returned only if they are configured on the system
Definition QC_Socket.dox.h:3300
Qore::AI_CANONNAME
const AI_CANONNAME
If this bit is set, then getaddrinfo() will return the canonical name of the hostname in the "canonna...
Definition QC_Socket.dox.h:3304
Qore::AI_ALL
const AI_ALL
If this bit is set along with AI_V4MAPPED then all matching IPv6 and IPv4 addresses are returned.
Definition QC_Socket.dox.h:3302
Qore::AI_NUMERICSERV
const AI_NUMERICSERV
If this bit is set, then the service is assumed to be a numeric port string, and no service lookup wi...
Definition QC_Socket.dox.h:3313
Qore::AI_V4MAPPED
const AI_V4MAPPED
If this bit is set, getaddrinfo() will return IPv4-mapped IPv6 addresses on finding no matching IPv6 ...
Definition QC_Socket.dox.h:3328
Qore::AI_PASSIVE
const AI_PASSIVE
If this bit is set, then the returned information should be usable for a call to Socket::bind()
Definition QC_Socket.dox.h:3324
Qore::IPPROTO_TCP
const IPPROTO_TCP
for the TCP protocol
Definition QC_Socket.dox.h:3336
Qore::IPPROTO_UDP
const IPPROTO_UDP
for the UDP protocol
Definition QC_Socket.dox.h:3338
Qore::SOCK_POLLIN
const SOCK_POLLIN
(input and output) for polling for read events
Definition QC_Socket.dox.h:3095
Qore::SOCK_POLLERR
const SOCK_POLLERR
(output only) indicates that the socket or connection is closed
Definition QC_Socket.dox.h:3093
Qore::SOCK_POLLOUT
const SOCK_POLLOUT
(input and output) for polling for write events
Definition QC_Socket.dox.h:3097
Qore::SOCK_STREAM
const SOCK_STREAM
for sequenced, reliable, two-way connection-based byte streams (the default)
Definition QC_Socket.dox.h:3350
Qore::SOCK_RAW
const SOCK_RAW
raw socket interface, only available to the superuser, untested
Definition QC_Socket.dox.h:3348
Qore::SOCK_DGRAM
const SOCK_DGRAM
for datagrams (connectionless, unreliable messages of a fixed (typically small) maximum length
Definition QC_Socket.dox.h:3346
Qore::SSL_VERIFY_NONE
const SSL_VERIFY_NONE
Do not verify the peer's certificate.
Definition QC_Socket.dox.h:3137
Qore::SSL_VERIFY_FAIL_IF_NO_PEER_CERT
const SSL_VERIFY_FAIL_IF_NO_PEER_CERT
Require a client certificate in server mode.
Definition QC_Socket.dox.h:3128
Qore::SSL_VERIFY_CLIENT_ONCE
const SSL_VERIFY_CLIENT_ONCE
Only request a client certificate once in server mode.
Definition QC_Socket.dox.h:3116
Qore::SSL_VERIFY_PEER
const SSL_VERIFY_PEER
Verify the peer's certificate.
Definition QC_Socket.dox.h:3154
Qore::hash
hash< auto > hash(object obj)
Returns a hash of an object's members.
Qore::list
list< auto > list(...)
Returns a list of the arguments passed at the top level.
Qore::binary
binary binary()
Always returns an empty binary object (of zero length)
Qore::X509_V_ERR_CERT_SIGNATURE_FAILURE
const X509_V_ERR_CERT_SIGNATURE_FAILURE
Certificate signature failure; the signature of the certificate is invalid.
Definition QC_Socket.dox.h:3181
Qore::X509_V_ERR_CERT_REJECTED
const X509_V_ERR_CERT_REJECTED
Root CA is marked to reject the specified purpose.
Definition QC_Socket.dox.h:3177
Qore::X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH
const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH
Issuer name and serial number of candidate certificate do not match the authority key identifier of t...
Definition QC_Socket.dox.h:3165
Qore::X509_VerificationReasons
const X509_VerificationReasons
maps from varification strings to verification code descriptions
Definition QC_Socket.dox.h:3231
Qore::X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD
const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD
Format error in certificate's notBefore field (invalid time)
Definition QC_Socket.dox.h:3195
Qore::X509_V_ERR_PATH_LENGTH_EXCEEDED
const X509_V_ERR_PATH_LENGTH_EXCEEDED
The basicConstraints pathlength parameter has been exceeded.
Definition QC_Socket.dox.h:3209
Qore::X509_V_ERR_KEYUSAGE_NO_CERTSIGN
const X509_V_ERR_KEYUSAGE_NO_CERTSIGN
The keyUsage extension does not permit certificate signing.
Definition QC_Socket.dox.h:3205
Qore::X509_V_ERR_INVALID_PURPOSE
const X509_V_ERR_INVALID_PURPOSE
The certificate cannot be used for the specified purpose.
Definition QC_Socket.dox.h:3203
Qore::X509_V_ERR_APPLICATION_VERIFICATION
const X509_V_ERR_APPLICATION_VERIFICATION
Verification failure.
Definition QC_Socket.dox.h:3169
Qore::X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT
const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT
Certificate is self-signed and cannot be found in the trusted list.
Definition QC_Socket.dox.h:3191
Qore::X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE
const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE
Unable to decrypt certificate's signature. This means that the actual signature value could not be de...
Definition QC_Socket.dox.h:3217
Qore::X509_V_ERR_UNABLE_TO_GET_CRL
const X509_V_ERR_UNABLE_TO_GET_CRL
Unable to get certificate CRL.
Definition QC_Socket.dox.h:3221
Qore::X509_V_OK
const X509_V_OK
Verification OK.
Definition QC_Socket.dox.h:3229
Qore::X509_V_ERR_CRL_NOT_YET_VALID
const X509_V_ERR_CRL_NOT_YET_VALID
CRL is not yet valid.
Definition QC_Socket.dox.h:3187
Qore::X509_V_ERR_CERT_CHAIN_TOO_LONG
const X509_V_ERR_CERT_CHAIN_TOO_LONG
Certificate chain too long.
Definition QC_Socket.dox.h:3171
Qore::X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY
const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY
Unable to get local issuer certificate. This normally means the list of trusted certificates is not c...
Definition QC_Socket.dox.h:3225
Qore::X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE
const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE
Unable to verify the first certificate.
Definition QC_Socket.dox.h:3227
Qore::X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY
const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY
Unable to decode issuer public key (SubjectPublicKeyInfo)
Definition QC_Socket.dox.h:3215
Qore::X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD
const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD
Format error in CRL's nextUpdate field (invalid time)
Definition QC_Socket.dox.h:3199
Qore::X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD
const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD
Format error in CRL's lastUpdate field (invalid time)
Definition QC_Socket.dox.h:3197
Qore::X509_V_ERR_CERT_REVOKED
const X509_V_ERR_CERT_REVOKED
Certificate has been revoked.
Definition QC_Socket.dox.h:3179
Qore::X509_V_ERR_SUBJECT_ISSUER_MISMATCH
const X509_V_ERR_SUBJECT_ISSUER_MISMATCH
The current candidate issuer certificate was rejected because its subject name did not match the issu...
Definition QC_Socket.dox.h:3213
Qore::X509_V_ERR_INVALID_CA
const X509_V_ERR_INVALID_CA
Invalid CA certificate.
Definition QC_Socket.dox.h:3201
Qore::X509_V_ERR_OUT_OF_MEM
const X509_V_ERR_OUT_OF_MEM
Out of memory error.
Definition QC_Socket.dox.h:3207
Qore::X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT
const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT
Unable to get issuer certificate.
Definition QC_Socket.dox.h:3223
Qore::X509_V_ERR_CRL_HAS_EXPIRED
const X509_V_ERR_CRL_HAS_EXPIRED
CRL has expired.
Definition QC_Socket.dox.h:3185
Qore::X509_V_ERR_CERT_UNTRUSTED
const X509_V_ERR_CERT_UNTRUSTED
Root CA is not marked as trusted for the specified purpose.
Definition QC_Socket.dox.h:3183
Qore::X509_V_ERR_CERT_NOT_YET_VALID
const X509_V_ERR_CERT_NOT_YET_VALID
Certificate is not yet valid.
Definition QC_Socket.dox.h:3175
Qore::X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD
const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD
Format error in certificate's notAfter field (invalid time)
Definition QC_Socket.dox.h:3193
Qore::X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE
const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE
Unable to decrypt CRL's signature.
Definition QC_Socket.dox.h:3219
Qore::X509_V_ERR_CERT_HAS_EXPIRED
const X509_V_ERR_CERT_HAS_EXPIRED
Certificate has expired.
Definition QC_Socket.dox.h:3173
Qore::X509_V_ERR_AKID_SKID_MISMATCH
const X509_V_ERR_AKID_SKID_MISMATCH
The current candidate issuer certificate was rejected because its subject key identifier was present ...
Definition QC_Socket.dox.h:3167
Qore::X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN
const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN
Self signed certificate in certificate chain.
Definition QC_Socket.dox.h:3211
Qore::X509_V_ERR_CRL_SIGNATURE_FAILURE
const X509_V_ERR_CRL_SIGNATURE_FAILURE
CRL signature failure; the signature of the certificate is invalid.
Definition QC_Socket.dox.h:3189
Qore
main Qore-language namespace
Definition Pseudo_QC_All.dox.h:3
Qore::SocketPollInfo
Socket or other pollable object poll info hash.
Definition QC_Socket.dox.h:26
Qore::SocketPollInfo::events
int events
The poll type; see Socket Poll Constants for possible values to be combined with binary or.
Definition QC_Socket.dox.h:30
Qore::SocketPollInfo::socket
Qore::AbstractPollableIoObject socket
the pollable object to monitor
Definition QC_Socket.dox.h:32
Qore::SseMessageInfo
Server-sent event hash.
Definition QC_Socket.dox.h:6
Qore::SseMessageInfo::event
string event
Event type.
Definition QC_Socket.dox.h:14
Qore::SseMessageInfo::retry
int retry
Client should set the reconnection time to this value in milliseconds.
Definition QC_Socket.dox.h:18
Qore::SseMessageInfo::comment
string comment
Any comment.
Definition QC_Socket.dox.h:8
Qore::SseMessageInfo::id
auto id
Message ID.
Definition QC_Socket.dox.h:16
Qore::SseMessageInfo::data
auto data
Message data.
Definition QC_Socket.dox.h:12