@chilkat/react-native 11.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/ChilkatRN.podspec +44 -0
- package/LICENSE +254 -0
- package/README.md +67 -0
- package/android/CMakeLists.txt +60 -0
- package/android/build.gradle +148 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/cpp/cpp-adapter.cpp +12 -0
- package/android/src/main/java/com/margelo/nitro/chilkat/ChilkatRNPackage.java +33 -0
- package/chilkat-checksums.json +9 -0
- package/cpp/HybridAi.cpp +660 -0
- package/cpp/HybridAi.hpp +159 -0
- package/cpp/HybridAsn.cpp +403 -0
- package/cpp/HybridAsn.hpp +105 -0
- package/cpp/HybridAuthAws.cpp +188 -0
- package/cpp/HybridAuthAws.hpp +55 -0
- package/cpp/HybridAuthAzureSAS.cpp +142 -0
- package/cpp/HybridAuthAzureSAS.hpp +47 -0
- package/cpp/HybridAuthAzureStorage.cpp +144 -0
- package/cpp/HybridAuthAzureStorage.hpp +47 -0
- package/cpp/HybridAuthGoogle.cpp +215 -0
- package/cpp/HybridAuthGoogle.hpp +67 -0
- package/cpp/HybridBinData.cpp +439 -0
- package/cpp/HybridBinData.hpp +112 -0
- package/cpp/HybridBz2.cpp +177 -0
- package/cpp/HybridBz2.hpp +58 -0
- package/cpp/HybridCache.cpp +314 -0
- package/cpp/HybridCache.hpp +82 -0
- package/cpp/HybridCert.cpp +840 -0
- package/cpp/HybridCert.hpp +196 -0
- package/cpp/HybridCertChain.cpp +149 -0
- package/cpp/HybridCertChain.hpp +50 -0
- package/cpp/HybridCertStore.cpp +276 -0
- package/cpp/HybridCertStore.hpp +78 -0
- package/cpp/HybridCharset.cpp +333 -0
- package/cpp/HybridCharset.hpp +83 -0
- package/cpp/HybridCkDateTime.cpp +384 -0
- package/cpp/HybridCkDateTime.hpp +105 -0
- package/cpp/HybridCodeSign.cpp +156 -0
- package/cpp/HybridCodeSign.hpp +55 -0
- package/cpp/HybridCompression.cpp +422 -0
- package/cpp/HybridCompression.hpp +100 -0
- package/cpp/HybridCrypt2.cpp +1517 -0
- package/cpp/HybridCrypt2.hpp +320 -0
- package/cpp/HybridCsr.cpp +292 -0
- package/cpp/HybridCsr.hpp +77 -0
- package/cpp/HybridCsv.cpp +382 -0
- package/cpp/HybridCsv.hpp +101 -0
- package/cpp/HybridDh.cpp +137 -0
- package/cpp/HybridDh.hpp +47 -0
- package/cpp/HybridDirTree.cpp +167 -0
- package/cpp/HybridDirTree.hpp +53 -0
- package/cpp/HybridDkim.cpp +249 -0
- package/cpp/HybridDkim.hpp +74 -0
- package/cpp/HybridDns.cpp +193 -0
- package/cpp/HybridDns.hpp +64 -0
- package/cpp/HybridDsa.cpp +453 -0
- package/cpp/HybridDsa.hpp +112 -0
- package/cpp/HybridDtObj.cpp +172 -0
- package/cpp/HybridDtObj.hpp +57 -0
- package/cpp/HybridEcc.cpp +195 -0
- package/cpp/HybridEcc.hpp +55 -0
- package/cpp/HybridEdDSA.cpp +147 -0
- package/cpp/HybridEdDSA.hpp +47 -0
- package/cpp/HybridEmail.cpp +1911 -0
- package/cpp/HybridEmail.hpp +419 -0
- package/cpp/HybridEmailBundle.cpp +204 -0
- package/cpp/HybridEmailBundle.hpp +64 -0
- package/cpp/HybridFileAccess.cpp +631 -0
- package/cpp/HybridFileAccess.hpp +149 -0
- package/cpp/HybridFtp2.cpp +2308 -0
- package/cpp/HybridFtp2.hpp +462 -0
- package/cpp/HybridGlobal.cpp +221 -0
- package/cpp/HybridGlobal.hpp +68 -0
- package/cpp/HybridGzip.cpp +440 -0
- package/cpp/HybridGzip.hpp +105 -0
- package/cpp/HybridHashtable.cpp +211 -0
- package/cpp/HybridHashtable.hpp +64 -0
- package/cpp/HybridHtmlToText.cpp +136 -0
- package/cpp/HybridHtmlToText.hpp +47 -0
- package/cpp/HybridHtmlToXml.cpp +218 -0
- package/cpp/HybridHtmlToXml.hpp +65 -0
- package/cpp/HybridHttp.cpp +2067 -0
- package/cpp/HybridHttp.hpp +416 -0
- package/cpp/HybridHttpCurl.cpp +337 -0
- package/cpp/HybridHttpCurl.hpp +93 -0
- package/cpp/HybridHttpRequest.cpp +455 -0
- package/cpp/HybridHttpRequest.hpp +109 -0
- package/cpp/HybridHttpResponse.cpp +340 -0
- package/cpp/HybridHttpResponse.hpp +86 -0
- package/cpp/HybridImap.cpp +1818 -0
- package/cpp/HybridImap.hpp +363 -0
- package/cpp/HybridJavaKeyStore.cpp +387 -0
- package/cpp/HybridJavaKeyStore.hpp +98 -0
- package/cpp/HybridJs.cpp +154 -0
- package/cpp/HybridJs.hpp +54 -0
- package/cpp/HybridJsonArray.cpp +441 -0
- package/cpp/HybridJsonArray.hpp +120 -0
- package/cpp/HybridJsonObject.cpp +1125 -0
- package/cpp/HybridJsonObject.hpp +260 -0
- package/cpp/HybridJwe.cpp +294 -0
- package/cpp/HybridJwe.hpp +82 -0
- package/cpp/HybridJws.cpp +290 -0
- package/cpp/HybridJws.hpp +82 -0
- package/cpp/HybridJwt.cpp +198 -0
- package/cpp/HybridJwt.hpp +57 -0
- package/cpp/HybridLog.cpp +212 -0
- package/cpp/HybridLog.hpp +63 -0
- package/cpp/HybridMailMan.cpp +1853 -0
- package/cpp/HybridMailMan.hpp +386 -0
- package/cpp/HybridMailboxes.cpp +165 -0
- package/cpp/HybridMailboxes.hpp +54 -0
- package/cpp/HybridMcp.cpp +322 -0
- package/cpp/HybridMcp.hpp +85 -0
- package/cpp/HybridMessageSet.cpp +162 -0
- package/cpp/HybridMessageSet.hpp +54 -0
- package/cpp/HybridMht.cpp +700 -0
- package/cpp/HybridMht.hpp +165 -0
- package/cpp/HybridMime.cpp +1119 -0
- package/cpp/HybridMime.hpp +266 -0
- package/cpp/HybridNtlm.cpp +333 -0
- package/cpp/HybridNtlm.hpp +83 -0
- package/cpp/HybridOAuth1.cpp +307 -0
- package/cpp/HybridOAuth1.hpp +78 -0
- package/cpp/HybridOAuth2.cpp +515 -0
- package/cpp/HybridOAuth2.hpp +127 -0
- package/cpp/HybridPdf.cpp +370 -0
- package/cpp/HybridPdf.hpp +103 -0
- package/cpp/HybridPem.cpp +327 -0
- package/cpp/HybridPem.hpp +88 -0
- package/cpp/HybridPfx.cpp +343 -0
- package/cpp/HybridPfx.hpp +87 -0
- package/cpp/HybridPkcs11.cpp +318 -0
- package/cpp/HybridPkcs11.hpp +88 -0
- package/cpp/HybridPrivateKey.cpp +464 -0
- package/cpp/HybridPrivateKey.hpp +117 -0
- package/cpp/HybridPrng.cpp +192 -0
- package/cpp/HybridPrng.hpp +57 -0
- package/cpp/HybridPublicKey.cpp +238 -0
- package/cpp/HybridPublicKey.hpp +68 -0
- package/cpp/HybridRest.cpp +993 -0
- package/cpp/HybridRest.hpp +214 -0
- package/cpp/HybridRsa.cpp +348 -0
- package/cpp/HybridRsa.hpp +90 -0
- package/cpp/HybridSCard.cpp +328 -0
- package/cpp/HybridSCard.hpp +91 -0
- package/cpp/HybridSFtp.cpp +1889 -0
- package/cpp/HybridSFtp.hpp +366 -0
- package/cpp/HybridSFtpDir.cpp +119 -0
- package/cpp/HybridSFtpDir.hpp +43 -0
- package/cpp/HybridSFtpFile.cpp +203 -0
- package/cpp/HybridSFtpFile.hpp +60 -0
- package/cpp/HybridScMinidriver.cpp +341 -0
- package/cpp/HybridScMinidriver.hpp +88 -0
- package/cpp/HybridScp.cpp +398 -0
- package/cpp/HybridScp.hpp +96 -0
- package/cpp/HybridSecrets.cpp +328 -0
- package/cpp/HybridSecrets.hpp +84 -0
- package/cpp/HybridSecureString.cpp +175 -0
- package/cpp/HybridSecureString.hpp +55 -0
- package/cpp/HybridServerSentEvent.cpp +112 -0
- package/cpp/HybridServerSentEvent.hpp +41 -0
- package/cpp/HybridSocket.cpp +1567 -0
- package/cpp/HybridSocket.hpp +336 -0
- package/cpp/HybridSpider.cpp +543 -0
- package/cpp/HybridSpider.hpp +138 -0
- package/cpp/HybridSsh.cpp +1330 -0
- package/cpp/HybridSsh.hpp +282 -0
- package/cpp/HybridSshKey.cpp +310 -0
- package/cpp/HybridSshKey.hpp +83 -0
- package/cpp/HybridSshTunnel.cpp +687 -0
- package/cpp/HybridSshTunnel.hpp +159 -0
- package/cpp/HybridStream.cpp +496 -0
- package/cpp/HybridStream.hpp +123 -0
- package/cpp/HybridStringArray.cpp +368 -0
- package/cpp/HybridStringArray.hpp +99 -0
- package/cpp/HybridStringBuilder.cpp +739 -0
- package/cpp/HybridStringBuilder.hpp +178 -0
- package/cpp/HybridStringTable.cpp +218 -0
- package/cpp/HybridStringTable.hpp +66 -0
- package/cpp/HybridTar.cpp +547 -0
- package/cpp/HybridTar.hpp +134 -0
- package/cpp/HybridTrustedRoots.cpp +178 -0
- package/cpp/HybridTrustedRoots.hpp +61 -0
- package/cpp/HybridUnixCompress.cpp +191 -0
- package/cpp/HybridUnixCompress.hpp +60 -0
- package/cpp/HybridUpload.cpp +427 -0
- package/cpp/HybridUpload.hpp +114 -0
- package/cpp/HybridUrl.cpp +152 -0
- package/cpp/HybridUrl.hpp +48 -0
- package/cpp/HybridWebSocket.cpp +378 -0
- package/cpp/HybridWebSocket.hpp +103 -0
- package/cpp/HybridXml.cpp +1527 -0
- package/cpp/HybridXml.hpp +340 -0
- package/cpp/HybridXmlCertVault.cpp +215 -0
- package/cpp/HybridXmlCertVault.hpp +63 -0
- package/cpp/HybridXmlDSig.cpp +328 -0
- package/cpp/HybridXmlDSig.hpp +88 -0
- package/cpp/HybridXmlDSigGen.cpp +549 -0
- package/cpp/HybridXmlDSigGen.hpp +126 -0
- package/cpp/HybridXmp.cpp +329 -0
- package/cpp/HybridXmp.hpp +86 -0
- package/cpp/HybridZip.cpp +1000 -0
- package/cpp/HybridZip.hpp +226 -0
- package/cpp/HybridZipCrc.cpp +162 -0
- package/cpp/HybridZipCrc.hpp +57 -0
- package/cpp/HybridZipEntry.cpp +395 -0
- package/cpp/HybridZipEntry.hpp +102 -0
- package/cpp/runtime/AsyncCall.hpp +96 -0
- package/cpp/runtime/Bytes.hpp +49 -0
- package/cpp/runtime/ChilkatError.hpp +66 -0
- package/cpp/runtime/ChilkatObject.hpp +219 -0
- package/cpp/runtime/ProgLang.hpp +9 -0
- package/cpp/runtime/ProgressAdapter.hpp +43 -0
- package/nitro.json +113 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/ChilkatRN+autolinking.cmake +179 -0
- package/nitrogen/generated/android/ChilkatRN+autolinking.gradle +27 -0
- package/nitrogen/generated/android/ChilkatRNOnLoad.cpp +1029 -0
- package/nitrogen/generated/android/ChilkatRNOnLoad.hpp +34 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/chilkat/ChilkatRNOnLoad.kt +35 -0
- package/nitrogen/generated/ios/ChilkatRN+autolinking.rb +62 -0
- package/nitrogen/generated/ios/ChilkatRN-Swift-Cxx-Bridge.cpp +17 -0
- package/nitrogen/generated/ios/ChilkatRN-Swift-Cxx-Bridge.hpp +27 -0
- package/nitrogen/generated/ios/ChilkatRN-Swift-Cxx-Umbrella.hpp +38 -0
- package/nitrogen/generated/ios/ChilkatRNAutolinking.mm +1015 -0
- package/nitrogen/generated/ios/ChilkatRNAutolinking.swift +16 -0
- package/nitrogen/generated/shared/c++/HybridAiSpec.cpp +114 -0
- package/nitrogen/generated/shared/c++/HybridAiSpec.hpp +175 -0
- package/nitrogen/generated/shared/c++/HybridAsnSpec.cpp +70 -0
- package/nitrogen/generated/shared/c++/HybridAsnSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridAuthAwsSpec.cpp +49 -0
- package/nitrogen/generated/shared/c++/HybridAuthAwsSpec.hpp +89 -0
- package/nitrogen/generated/shared/c++/HybridAuthAzureSASSpec.cpp +38 -0
- package/nitrogen/generated/shared/c++/HybridAuthAzureSASSpec.hpp +78 -0
- package/nitrogen/generated/shared/c++/HybridAuthAzureStorageSpec.cpp +41 -0
- package/nitrogen/generated/shared/c++/HybridAuthAzureStorageSpec.hpp +81 -0
- package/nitrogen/generated/shared/c++/HybridAuthGoogleSpec.cpp +56 -0
- package/nitrogen/generated/shared/c++/HybridAuthGoogleSpec.hpp +108 -0
- package/nitrogen/generated/shared/c++/HybridBinDataSpec.cpp +69 -0
- package/nitrogen/generated/shared/c++/HybridBinDataSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridBz2Spec.cpp +47 -0
- package/nitrogen/generated/shared/c++/HybridBz2Spec.hpp +93 -0
- package/nitrogen/generated/shared/c++/HybridCacheSpec.cpp +57 -0
- package/nitrogen/generated/shared/c++/HybridCacheSpec.hpp +106 -0
- package/nitrogen/generated/shared/c++/HybridCertChainSpec.cpp +40 -0
- package/nitrogen/generated/shared/c++/HybridCertChainSpec.hpp +89 -0
- package/nitrogen/generated/shared/c++/HybridCertSpec.cpp +138 -0
- package/nitrogen/generated/shared/c++/HybridCertSpec.hpp +205 -0
- package/nitrogen/generated/shared/c++/HybridCertStoreSpec.cpp +55 -0
- package/nitrogen/generated/shared/c++/HybridCertStoreSpec.hpp +104 -0
- package/nitrogen/generated/shared/c++/HybridCharsetSpec.cpp +61 -0
- package/nitrogen/generated/shared/c++/HybridCharsetSpec.hpp +101 -0
- package/nitrogen/generated/shared/c++/HybridCkDateTimeSpec.cpp +66 -0
- package/nitrogen/generated/shared/c++/HybridCkDateTimeSpec.hpp +115 -0
- package/nitrogen/generated/shared/c++/HybridCodeSignSpec.cpp +44 -0
- package/nitrogen/generated/shared/c++/HybridCodeSignSpec.hpp +93 -0
- package/nitrogen/generated/shared/c++/HybridCompressionSpec.cpp +79 -0
- package/nitrogen/generated/shared/c++/HybridCompressionSpec.hpp +134 -0
- package/nitrogen/generated/shared/c++/HybridCrypt2Spec.cpp +215 -0
- package/nitrogen/generated/shared/c++/HybridCrypt2Spec.hpp +283 -0
- package/nitrogen/generated/shared/c++/HybridCsrSpec.cpp +61 -0
- package/nitrogen/generated/shared/c++/HybridCsrSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridCsvSpec.cpp +72 -0
- package/nitrogen/generated/shared/c++/HybridCsvSpec.hpp +121 -0
- package/nitrogen/generated/shared/c++/HybridDhSpec.cpp +37 -0
- package/nitrogen/generated/shared/c++/HybridDhSpec.hpp +77 -0
- package/nitrogen/generated/shared/c++/HybridDirTreeSpec.cpp +46 -0
- package/nitrogen/generated/shared/c++/HybridDirTreeSpec.hpp +86 -0
- package/nitrogen/generated/shared/c++/HybridDkimSpec.cpp +60 -0
- package/nitrogen/generated/shared/c++/HybridDkimSpec.hpp +109 -0
- package/nitrogen/generated/shared/c++/HybridDnsSpec.cpp +51 -0
- package/nitrogen/generated/shared/c++/HybridDnsSpec.hpp +97 -0
- package/nitrogen/generated/shared/c++/HybridDsaSpec.cpp +73 -0
- package/nitrogen/generated/shared/c++/HybridDsaSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridDtObjSpec.cpp +50 -0
- package/nitrogen/generated/shared/c++/HybridDtObjSpec.hpp +90 -0
- package/nitrogen/generated/shared/c++/HybridEccSpec.cpp +41 -0
- package/nitrogen/generated/shared/c++/HybridEccSpec.hpp +96 -0
- package/nitrogen/generated/shared/c++/HybridEdDSASpec.cpp +38 -0
- package/nitrogen/generated/shared/c++/HybridEdDSASpec.hpp +90 -0
- package/nitrogen/generated/shared/c++/HybridEmailBundleSpec.cpp +45 -0
- package/nitrogen/generated/shared/c++/HybridEmailBundleSpec.hpp +91 -0
- package/nitrogen/generated/shared/c++/HybridEmailSpec.cpp +259 -0
- package/nitrogen/generated/shared/c++/HybridEmailSpec.hpp +326 -0
- package/nitrogen/generated/shared/c++/HybridFileAccessSpec.cpp +90 -0
- package/nitrogen/generated/shared/c++/HybridFileAccessSpec.hpp +140 -0
- package/nitrogen/generated/shared/c++/HybridFtp2Spec.cpp +367 -0
- package/nitrogen/generated/shared/c++/HybridFtp2Spec.hpp +434 -0
- package/nitrogen/generated/shared/c++/HybridGlobalSpec.cpp +59 -0
- package/nitrogen/generated/shared/c++/HybridGlobalSpec.hpp +99 -0
- package/nitrogen/generated/shared/c++/HybridGzipSpec.cpp +79 -0
- package/nitrogen/generated/shared/c++/HybridGzipSpec.hpp +134 -0
- package/nitrogen/generated/shared/c++/HybridHashtableSpec.cpp +45 -0
- package/nitrogen/generated/shared/c++/HybridHashtableSpec.hpp +91 -0
- package/nitrogen/generated/shared/c++/HybridHtmlToTextSpec.cpp +40 -0
- package/nitrogen/generated/shared/c++/HybridHtmlToTextSpec.hpp +83 -0
- package/nitrogen/generated/shared/c++/HybridHtmlToXmlSpec.cpp +49 -0
- package/nitrogen/generated/shared/c++/HybridHtmlToXmlSpec.hpp +95 -0
- package/nitrogen/generated/shared/c++/HybridHttpCurlSpec.cpp +67 -0
- package/nitrogen/generated/shared/c++/HybridHttpCurlSpec.hpp +125 -0
- package/nitrogen/generated/shared/c++/HybridHttpRequestSpec.cpp +76 -0
- package/nitrogen/generated/shared/c++/HybridHttpRequestSpec.hpp +122 -0
- package/nitrogen/generated/shared/c++/HybridHttpResponseSpec.cpp +64 -0
- package/nitrogen/generated/shared/c++/HybridHttpResponseSpec.hpp +119 -0
- package/nitrogen/generated/shared/c++/HybridHttpSpec.cpp +334 -0
- package/nitrogen/generated/shared/c++/HybridHttpSpec.hpp +407 -0
- package/nitrogen/generated/shared/c++/HybridImapSpec.cpp +275 -0
- package/nitrogen/generated/shared/c++/HybridImapSpec.hpp +360 -0
- package/nitrogen/generated/shared/c++/HybridJavaKeyStoreSpec.cpp +65 -0
- package/nitrogen/generated/shared/c++/HybridJavaKeyStoreSpec.hpp +132 -0
- package/nitrogen/generated/shared/c++/HybridJsSpec.cpp +43 -0
- package/nitrogen/generated/shared/c++/HybridJsSpec.hpp +92 -0
- package/nitrogen/generated/shared/c++/HybridJsonArraySpec.cpp +76 -0
- package/nitrogen/generated/shared/c++/HybridJsonArraySpec.hpp +131 -0
- package/nitrogen/generated/shared/c++/HybridJsonObjectSpec.cpp +154 -0
- package/nitrogen/generated/shared/c++/HybridJsonObjectSpec.hpp +218 -0
- package/nitrogen/generated/shared/c++/HybridJweSpec.cpp +57 -0
- package/nitrogen/generated/shared/c++/HybridJweSpec.hpp +112 -0
- package/nitrogen/generated/shared/c++/HybridJwsSpec.cpp +57 -0
- package/nitrogen/generated/shared/c++/HybridJwsSpec.hpp +115 -0
- package/nitrogen/generated/shared/c++/HybridJwtSpec.cpp +43 -0
- package/nitrogen/generated/shared/c++/HybridJwtSpec.hpp +92 -0
- package/nitrogen/generated/shared/c++/HybridLogSpec.cpp +44 -0
- package/nitrogen/generated/shared/c++/HybridLogSpec.hpp +85 -0
- package/nitrogen/generated/shared/c++/HybridMailManSpec.cpp +311 -0
- package/nitrogen/generated/shared/c++/HybridMailManSpec.hpp +396 -0
- package/nitrogen/generated/shared/c++/HybridMailboxesSpec.cpp +40 -0
- package/nitrogen/generated/shared/c++/HybridMailboxesSpec.hpp +80 -0
- package/nitrogen/generated/shared/c++/HybridMcpSpec.cpp +68 -0
- package/nitrogen/generated/shared/c++/HybridMcpSpec.hpp +117 -0
- package/nitrogen/generated/shared/c++/HybridMessageSetSpec.cpp +41 -0
- package/nitrogen/generated/shared/c++/HybridMessageSetSpec.hpp +84 -0
- package/nitrogen/generated/shared/c++/HybridMhtSpec.cpp +138 -0
- package/nitrogen/generated/shared/c++/HybridMhtSpec.hpp +181 -0
- package/nitrogen/generated/shared/c++/HybridMimeSpec.cpp +169 -0
- package/nitrogen/generated/shared/c++/HybridMimeSpec.hpp +233 -0
- package/nitrogen/generated/shared/c++/HybridNtlmSpec.cpp +69 -0
- package/nitrogen/generated/shared/c++/HybridNtlmSpec.hpp +109 -0
- package/nitrogen/generated/shared/c++/HybridOAuth1Spec.cpp +67 -0
- package/nitrogen/generated/shared/c++/HybridOAuth1Spec.hpp +110 -0
- package/nitrogen/generated/shared/c++/HybridOAuth2Spec.cpp +107 -0
- package/nitrogen/generated/shared/c++/HybridOAuth2Spec.hpp +156 -0
- package/nitrogen/generated/shared/c++/HybridPdfSpec.cpp +73 -0
- package/nitrogen/generated/shared/c++/HybridPdfSpec.hpp +134 -0
- package/nitrogen/generated/shared/c++/HybridPemSpec.cpp +63 -0
- package/nitrogen/generated/shared/c++/HybridPemSpec.hpp +124 -0
- package/nitrogen/generated/shared/c++/HybridPfxSpec.cpp +61 -0
- package/nitrogen/generated/shared/c++/HybridPfxSpec.hpp +122 -0
- package/nitrogen/generated/shared/c++/HybridPkcs11Spec.cpp +60 -0
- package/nitrogen/generated/shared/c++/HybridPkcs11Spec.hpp +115 -0
- package/nitrogen/generated/shared/c++/HybridPrivateKeySpec.cpp +76 -0
- package/nitrogen/generated/shared/c++/HybridPrivateKeySpec.hpp +131 -0
- package/nitrogen/generated/shared/c++/HybridPrngSpec.cpp +42 -0
- package/nitrogen/generated/shared/c++/HybridPrngSpec.hpp +85 -0
- package/nitrogen/generated/shared/c++/HybridPublicKeySpec.cpp +48 -0
- package/nitrogen/generated/shared/c++/HybridPublicKeySpec.hpp +91 -0
- package/nitrogen/generated/shared/c++/HybridRestSpec.cpp +150 -0
- package/nitrogen/generated/shared/c++/HybridRestSpec.hpp +229 -0
- package/nitrogen/generated/shared/c++/HybridRsaSpec.cpp +68 -0
- package/nitrogen/generated/shared/c++/HybridRsaSpec.hpp +120 -0
- package/nitrogen/generated/shared/c++/HybridSCardSpec.cpp +64 -0
- package/nitrogen/generated/shared/c++/HybridSCardSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridSFtpDirSpec.cpp +35 -0
- package/nitrogen/generated/shared/c++/HybridSFtpDirSpec.hpp +78 -0
- package/nitrogen/generated/shared/c++/HybridSFtpFileSpec.cpp +57 -0
- package/nitrogen/generated/shared/c++/HybridSFtpFileSpec.hpp +98 -0
- package/nitrogen/generated/shared/c++/HybridSFtpSpec.cpp +284 -0
- package/nitrogen/generated/shared/c++/HybridSFtpSpec.hpp +354 -0
- package/nitrogen/generated/shared/c++/HybridScMinidriverSpec.cpp +61 -0
- package/nitrogen/generated/shared/c++/HybridScMinidriverSpec.hpp +119 -0
- package/nitrogen/generated/shared/c++/HybridScpSpec.cpp +78 -0
- package/nitrogen/generated/shared/c++/HybridScpSpec.hpp +127 -0
- package/nitrogen/generated/shared/c++/HybridSecretsSpec.cpp +65 -0
- package/nitrogen/generated/shared/c++/HybridSecretsSpec.hpp +120 -0
- package/nitrogen/generated/shared/c++/HybridSecureStringSpec.cpp +42 -0
- package/nitrogen/generated/shared/c++/HybridSecureStringSpec.hpp +88 -0
- package/nitrogen/generated/shared/c++/HybridServerSentEventSpec.cpp +35 -0
- package/nitrogen/generated/shared/c++/HybridServerSentEventSpec.hpp +75 -0
- package/nitrogen/generated/shared/c++/HybridSocketSpec.cpp +262 -0
- package/nitrogen/generated/shared/c++/HybridSocketSpec.hpp +327 -0
- package/nitrogen/generated/shared/c++/HybridSpiderSpec.cpp +110 -0
- package/nitrogen/generated/shared/c++/HybridSpiderSpec.hpp +153 -0
- package/nitrogen/generated/shared/c++/HybridSshKeySpec.cpp +59 -0
- package/nitrogen/generated/shared/c++/HybridSshKeySpec.hpp +102 -0
- package/nitrogen/generated/shared/c++/HybridSshSpec.cpp +215 -0
- package/nitrogen/generated/shared/c++/HybridSshSpec.hpp +276 -0
- package/nitrogen/generated/shared/c++/HybridSshTunnelSpec.cpp +136 -0
- package/nitrogen/generated/shared/c++/HybridSshTunnelSpec.hpp +191 -0
- package/nitrogen/generated/shared/c++/HybridStreamSpec.cpp +100 -0
- package/nitrogen/generated/shared/c++/HybridStreamSpec.hpp +150 -0
- package/nitrogen/generated/shared/c++/HybridStringArraySpec.cpp +66 -0
- package/nitrogen/generated/shared/c++/HybridStringArraySpec.hpp +109 -0
- package/nitrogen/generated/shared/c++/HybridStringBuilderSpec.cpp +104 -0
- package/nitrogen/generated/shared/c++/HybridStringBuilderSpec.hpp +156 -0
- package/nitrogen/generated/shared/c++/HybridStringTableSpec.cpp +46 -0
- package/nitrogen/generated/shared/c++/HybridStringTableSpec.hpp +89 -0
- package/nitrogen/generated/shared/c++/HybridTarSpec.cpp +110 -0
- package/nitrogen/generated/shared/c++/HybridTarSpec.hpp +156 -0
- package/nitrogen/generated/shared/c++/HybridTrustedRootsSpec.cpp +48 -0
- package/nitrogen/generated/shared/c++/HybridTrustedRootsSpec.hpp +97 -0
- package/nitrogen/generated/shared/c++/HybridUnixCompressSpec.cpp +48 -0
- package/nitrogen/generated/shared/c++/HybridUnixCompressSpec.hpp +91 -0
- package/nitrogen/generated/shared/c++/HybridUploadSpec.cpp +98 -0
- package/nitrogen/generated/shared/c++/HybridUploadSpec.hpp +141 -0
- package/nitrogen/generated/shared/c++/HybridUrlSpec.cpp +42 -0
- package/nitrogen/generated/shared/c++/HybridUrlSpec.hpp +82 -0
- package/nitrogen/generated/shared/c++/HybridWebSocketSpec.cpp +80 -0
- package/nitrogen/generated/shared/c++/HybridWebSocketSpec.hpp +135 -0
- package/nitrogen/generated/shared/c++/HybridXmlCertVaultSpec.cpp +45 -0
- package/nitrogen/generated/shared/c++/HybridXmlCertVaultSpec.hpp +94 -0
- package/nitrogen/generated/shared/c++/HybridXmlDSigGenSpec.cpp +99 -0
- package/nitrogen/generated/shared/c++/HybridXmlDSigGenSpec.hpp +163 -0
- package/nitrogen/generated/shared/c++/HybridXmlDSigSpec.cpp +62 -0
- package/nitrogen/generated/shared/c++/HybridXmlDSigSpec.hpp +126 -0
- package/nitrogen/generated/shared/c++/HybridXmlSpec.cpp +203 -0
- package/nitrogen/generated/shared/c++/HybridXmlSpec.hpp +253 -0
- package/nitrogen/generated/shared/c++/HybridXmpSpec.cpp +58 -0
- package/nitrogen/generated/shared/c++/HybridXmpSpec.hpp +104 -0
- package/nitrogen/generated/shared/c++/HybridZipCrcSpec.cpp +43 -0
- package/nitrogen/generated/shared/c++/HybridZipCrcSpec.hpp +92 -0
- package/nitrogen/generated/shared/c++/HybridZipEntrySpec.cpp +82 -0
- package/nitrogen/generated/shared/c++/HybridZipEntrySpec.hpp +137 -0
- package/nitrogen/generated/shared/c++/HybridZipSpec.cpp +176 -0
- package/nitrogen/generated/shared/c++/HybridZipSpec.hpp +231 -0
- package/package.json +46 -0
- package/react-native.config.js +9 -0
- package/scripts/fetch-chilkat.js +184 -0
- package/src/index.ts +306 -0
- package/src/runtime/chilkat.ts +25 -0
- package/src/specs/Ai.nitro.ts +1288 -0
- package/src/specs/Asn.nitro.ts +509 -0
- package/src/specs/AuthAws.nitro.ts +234 -0
- package/src/specs/AuthAzureSAS.nitro.ts +205 -0
- package/src/specs/AuthAzureStorage.nitro.ts +172 -0
- package/src/specs/AuthGoogle.nitro.ts +291 -0
- package/src/specs/BinData.nitro.ts +470 -0
- package/src/specs/Bz2.nitro.ts +269 -0
- package/src/specs/Cache.nitro.ts +483 -0
- package/src/specs/Cert.nitro.ts +1279 -0
- package/src/specs/CertChain.nitro.ts +312 -0
- package/src/specs/CertStore.nitro.ts +430 -0
- package/src/specs/Charset.nitro.ts +518 -0
- package/src/specs/CkDateTime.nitro.ts +492 -0
- package/src/specs/CodeSign.nitro.ts +307 -0
- package/src/specs/Compression.nitro.ts +654 -0
- package/src/specs/Crypt2.nitro.ts +2387 -0
- package/src/specs/Csr.nitro.ts +461 -0
- package/src/specs/Csv.nitro.ts +670 -0
- package/src/specs/Dh.nitro.ts +343 -0
- package/src/specs/DirTree.nitro.ts +332 -0
- package/src/specs/Dkim.nitro.ts +595 -0
- package/src/specs/Dns.nitro.ts +271 -0
- package/src/specs/Dsa.nitro.ts +653 -0
- package/src/specs/DtObj.nitro.ts +198 -0
- package/src/specs/Ecc.nitro.ts +375 -0
- package/src/specs/EdDSA.nitro.ts +273 -0
- package/src/specs/Email.nitro.ts +2921 -0
- package/src/specs/EmailBundle.nitro.ts +334 -0
- package/src/specs/FileAccess.nitro.ts +836 -0
- package/src/specs/Ftp2.nitro.ts +3943 -0
- package/src/specs/Global.nitro.ts +319 -0
- package/src/specs/Gzip.nitro.ts +646 -0
- package/src/specs/Hashtable.nitro.ts +356 -0
- package/src/specs/HtmlToText.nitro.ts +238 -0
- package/src/specs/HtmlToXml.nitro.ts +323 -0
- package/src/specs/Http.nitro.ts +3095 -0
- package/src/specs/HttpCurl.nitro.ts +550 -0
- package/src/specs/HttpRequest.nitro.ts +522 -0
- package/src/specs/HttpResponse.nitro.ts +424 -0
- package/src/specs/Imap.nitro.ts +2991 -0
- package/src/specs/JavaKeyStore.nitro.ts +619 -0
- package/src/specs/Js.nitro.ts +263 -0
- package/src/specs/JsonArray.nitro.ts +681 -0
- package/src/specs/JsonObject.nitro.ts +1454 -0
- package/src/specs/Jwe.nitro.ts +756 -0
- package/src/specs/Jws.nitro.ts +733 -0
- package/src/specs/Jwt.nitro.ts +380 -0
- package/src/specs/Log.nitro.ts +258 -0
- package/src/specs/MailMan.nitro.ts +3571 -0
- package/src/specs/Mailboxes.nitro.ts +251 -0
- package/src/specs/Mcp.nitro.ts +491 -0
- package/src/specs/MessageSet.nitro.ts +320 -0
- package/src/specs/Mht.nitro.ts +1684 -0
- package/src/specs/Mime.nitro.ts +1745 -0
- package/src/specs/Ntlm.nitro.ts +556 -0
- package/src/specs/OAuth1.nitro.ts +331 -0
- package/src/specs/OAuth2.nitro.ts +1023 -0
- package/src/specs/Pdf.nitro.ts +740 -0
- package/src/specs/Pem.nitro.ts +484 -0
- package/src/specs/Pfx.nitro.ts +1003 -0
- package/src/specs/Pkcs11.nitro.ts +559 -0
- package/src/specs/PrivateKey.nitro.ts +994 -0
- package/src/specs/Prng.nitro.ts +348 -0
- package/src/specs/PublicKey.nitro.ts +610 -0
- package/src/specs/Rest.nitro.ts +1972 -0
- package/src/specs/Rsa.nitro.ts +453 -0
- package/src/specs/SCard.nitro.ts +739 -0
- package/src/specs/SFtp.nitro.ts +3138 -0
- package/src/specs/SFtpDir.nitro.ts +213 -0
- package/src/specs/SFtpFile.nitro.ts +452 -0
- package/src/specs/ScMinidriver.nitro.ts +443 -0
- package/src/specs/Scp.nitro.ts +708 -0
- package/src/specs/Secrets.nitro.ts +470 -0
- package/src/specs/SecureString.nitro.ts +231 -0
- package/src/specs/ServerSentEvent.nitro.ts +183 -0
- package/src/specs/Socket.nitro.ts +3335 -0
- package/src/specs/Spider.nitro.ts +609 -0
- package/src/specs/Ssh.nitro.ts +2842 -0
- package/src/specs/SshKey.nitro.ts +740 -0
- package/src/specs/SshTunnel.nitro.ts +1243 -0
- package/src/specs/Stream.nitro.ts +737 -0
- package/src/specs/StringArray.nitro.ts +396 -0
- package/src/specs/StringBuilder.nitro.ts +920 -0
- package/src/specs/StringTable.nitro.ts +271 -0
- package/src/specs/Tar.nitro.ts +804 -0
- package/src/specs/TrustedRoots.nitro.ts +360 -0
- package/src/specs/UnixCompress.nitro.ts +293 -0
- package/src/specs/Upload.nitro.ts +623 -0
- package/src/specs/Url.nitro.ts +246 -0
- package/src/specs/WebSocket.nitro.ts +840 -0
- package/src/specs/Xml.nitro.ts +1988 -0
- package/src/specs/XmlCertVault.nitro.ts +259 -0
- package/src/specs/XmlDSig.nitro.ts +464 -0
- package/src/specs/XmlDSigGen.nitro.ts +978 -0
- package/src/specs/Xmp.nitro.ts +364 -0
- package/src/specs/Zip.nitro.ts +1611 -0
- package/src/specs/ZipCrc.nitro.ts +229 -0
- package/src/specs/ZipEntry.nitro.ts +782 -0
|
@@ -0,0 +1,840 @@
|
|
|
1
|
+
// Generated by ReactNativeNs.RnGenerator -- do not edit.
|
|
2
|
+
import type { HybridObject } from 'react-native-nitro-modules'
|
|
3
|
+
import type { BinData } from './BinData.nitro'
|
|
4
|
+
import type { Rest } from './Rest.nitro'
|
|
5
|
+
import type { StringBuilder } from './StringBuilder.nitro'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Connect to WebSocket servers and exchange client-side frames and messages.
|
|
9
|
+
*
|
|
10
|
+
* **Client-side only:**
|
|
11
|
+
* `WebSocket` implements the client side of the WebSocket
|
|
12
|
+
* protocol. It initiates an opening handshake with an existing WebSocket
|
|
13
|
+
* server. It does not listen for incoming connections, accept clients, or
|
|
14
|
+
* implement a WebSocket server.
|
|
15
|
+
*
|
|
16
|
+
* `WebSocket` operates over an established
|
|
17
|
+
* `Chilkat.Rest` connection. It creates and validates the HTTP
|
|
18
|
+
* upgrade handshake, sends and receives text or binary frames, supports
|
|
19
|
+
* fragmented messages, handles Ping, Pong, and Close control frames, polls for
|
|
20
|
+
* incoming data, and exposes frame-level diagnostics.
|
|
21
|
+
*
|
|
22
|
+
* **Client opening handshake**
|
|
23
|
+
*
|
|
24
|
+
* Upgrade a connected `Rest` session to WebSocket and validate
|
|
25
|
+
* the server's response before exchanging frames.
|
|
26
|
+
*
|
|
27
|
+
* **Text and binary messages**
|
|
28
|
+
*
|
|
29
|
+
* Send UTF-8 text or exact binary bytes as single-frame or fragmented
|
|
30
|
+
* WebSocket messages.
|
|
31
|
+
*
|
|
32
|
+
* **Frame-by-frame receiving**
|
|
33
|
+
*
|
|
34
|
+
* Read frames, inspect opcodes and the FIN state, and accumulate fragments
|
|
35
|
+
* until a complete message is available.
|
|
36
|
+
*
|
|
37
|
+
* **Ping and Pong**
|
|
38
|
+
*
|
|
39
|
+
* Use automatic or manual control-frame handling for keep-alive and
|
|
40
|
+
* responsiveness checks.
|
|
41
|
+
*
|
|
42
|
+
* **Clean close handshake**
|
|
43
|
+
*
|
|
44
|
+
* Exchange Close frames, inspect the peer's status code and reason, and
|
|
45
|
+
* terminate the underlying connection cleanly.
|
|
46
|
+
*
|
|
47
|
+
* **Separate read/write paths**
|
|
48
|
+
*
|
|
49
|
+
* Share a connection between two WebSocket objects when one thread needs
|
|
50
|
+
* to read while another writes.
|
|
51
|
+
*
|
|
52
|
+
* **Typical connection sequence:**
|
|
53
|
+
* Connect a `Rest` object to the server, call
|
|
54
|
+
* `UseConnection`, call `AddClientHeaders`, send the
|
|
55
|
+
* opening HTTP `GET` request through `Rest`, and then
|
|
56
|
+
* call `ValidateServerHandshake`. Only after validation succeeds
|
|
57
|
+
* should the application call frame send/receive methods.
|
|
58
|
+
*
|
|
59
|
+
* **Frames versus messages:**
|
|
60
|
+
* A WebSocket message may consist of one frame or several fragments. When
|
|
61
|
+
* receiving a fragmented message, call `ReadFrame` until
|
|
62
|
+
* `FinalFrame` is `true`, then retrieve the accumulated data with
|
|
63
|
+
* `GetFrameData`, `GetFrameDataSb`, or
|
|
64
|
+
* `GetFrameDataBd`.
|
|
65
|
+
*
|
|
66
|
+
* For an extended overview, see
|
|
67
|
+
* [WebSocket Class Overview](https://www.chilkatsoft.com/websocket_class_overview.asp).
|
|
68
|
+
*
|
|
69
|
+
* Each `WebSocket` instance owns a native Chilkat object. It is released when the JavaScript object
|
|
70
|
+
* is
|
|
71
|
+
* garbage collected, or immediately by `dispose()`; any use after `dispose()` throws.
|
|
72
|
+
* Create one with `new WebSocket()`.
|
|
73
|
+
*
|
|
74
|
+
* Methods that can take a while (network, files, compression, key generation) also have an
|
|
75
|
+
* `...Async` form returning a `Promise`; it runs on a native worker thread so the UI keeps
|
|
76
|
+
* rendering. While such a call is pending, every other call on this object throws, except
|
|
77
|
+
* {@link WebSocket.abort} and assigning {@link WebSocket.onPercentDone} / {@link
|
|
78
|
+
* WebSocket.onProgressInfo}.
|
|
79
|
+
*/
|
|
80
|
+
export interface WebSocket extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
81
|
+
// ---- Properties ----
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Provides HTML-formatted information about the last called method or property. If a method call
|
|
85
|
+
* fails or behaves unexpectedly, check this property for details. Note that information is
|
|
86
|
+
* available regardless of the method call's success.
|
|
87
|
+
*
|
|
88
|
+
* This property is read-only.
|
|
89
|
+
*/
|
|
90
|
+
readonly lastErrorHtml: string
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Provides plain text information about the last called method or property. If a method call
|
|
94
|
+
* fails or behaves unexpectedly, check this property for details. Note that information is
|
|
95
|
+
* available regardless of the method call's success.
|
|
96
|
+
*
|
|
97
|
+
* This property is read-only.
|
|
98
|
+
*/
|
|
99
|
+
readonly lastErrorText: string
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Provides XML-formatted information about the last called method or property. If a method call
|
|
103
|
+
* fails or behaves unexpectedly, check this property for details. Note that information is
|
|
104
|
+
* available regardless of the method call's success.
|
|
105
|
+
*
|
|
106
|
+
* This property is read-only.
|
|
107
|
+
*/
|
|
108
|
+
readonly lastErrorXml: string
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Version of the component/library, such as "10.1.0"
|
|
112
|
+
*
|
|
113
|
+
* This property is read-only.
|
|
114
|
+
*/
|
|
115
|
+
readonly version: string
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* If set to a file path, this property logs the LastErrorText of each Chilkat method or property
|
|
119
|
+
* call to the specified file. This logging helps identify the context and history of Chilkat
|
|
120
|
+
* calls leading up to any crash or hang, aiding in debugging.
|
|
121
|
+
*
|
|
122
|
+
* Enabling the VerboseLogging property provides more detailed information.
|
|
123
|
+
*
|
|
124
|
+
* This property is mainly used for debugging rare instances where a Chilkat method call causes a
|
|
125
|
+
* hang or crash, which should generally not happen.
|
|
126
|
+
*
|
|
127
|
+
* Possible causes of hangs include:
|
|
128
|
+
*
|
|
129
|
+
* - A timeout property set to 0, indicating an infinite timeout.
|
|
130
|
+
*
|
|
131
|
+
* - A hang occurring within an event callback in the application code.
|
|
132
|
+
*
|
|
133
|
+
* - An internal bug in the Chilkat code causing the hang.
|
|
134
|
+
*/
|
|
135
|
+
debugLogFilePath: string
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* If set to `true`, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may
|
|
139
|
+
* contain more verbose information. The default value is `false`. Verbose logging should only be
|
|
140
|
+
* used for debugging. The potentially large quantity of logged information may adversely affect
|
|
141
|
+
* peformance.
|
|
142
|
+
*/
|
|
143
|
+
verboseLogging: boolean
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Indicates the success or failure of the most recent method call: `true` means success, `false`
|
|
147
|
+
* means failure. This property remains unchanged by property setters or getters. This method is
|
|
148
|
+
* present to address challenges in checking for null or Nothing returns in certain programming
|
|
149
|
+
* languages. Note: This property does not apply to methods that return integer values or to
|
|
150
|
+
* boolean-returning methods where the boolean does not indicate success or failure.
|
|
151
|
+
*/
|
|
152
|
+
lastMethodSuccess: boolean
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Specifies the maximum number of milliseconds an active send or receive operation may remain
|
|
156
|
+
* stalled while waiting for additional network progress.
|
|
157
|
+
*
|
|
158
|
+
* The default is `30000` milliseconds (30 seconds). This is an **inactivity timeout**, not a
|
|
159
|
+
* total limit on the duration of the operation. An operation may continue longer than this value
|
|
160
|
+
* as long as data continues to be transferred.
|
|
161
|
+
*
|
|
162
|
+
* **Not a keep-alive interval:** This property does not automatically send WebSocket Ping frames.
|
|
163
|
+
* Use `SendPing` when the application needs protocol-level keep-alive or responsiveness checks.
|
|
164
|
+
*/
|
|
165
|
+
idleTimeoutMs: number
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Returns the symbolic opcode of the frame most recently delivered by `ReadFrame`.
|
|
169
|
+
*
|
|
170
|
+
* ValueMeaning
|
|
171
|
+
*
|
|
172
|
+
* | `Continuation` | | A later fragment of a Text or Binary message |
|
|
173
|
+
*
|
|
174
|
+
* | `Text` | | UTF-8 text data |
|
|
175
|
+
*
|
|
176
|
+
* | `Binary` | | Binary data |
|
|
177
|
+
*
|
|
178
|
+
* | `Close` | | Closing handshake |
|
|
179
|
+
*
|
|
180
|
+
* | `Ping` | | Ping control frame |
|
|
181
|
+
*
|
|
182
|
+
* | `Pong` | | Pong control frame |
|
|
183
|
+
*
|
|
184
|
+
* Before any frame has been received, the value is the empty string. Ping or Pong frames handled
|
|
185
|
+
* internally by the auto-response/auto-consume options may not be returned as the current frame.
|
|
186
|
+
*
|
|
187
|
+
* This property is read-only.
|
|
188
|
+
*/
|
|
189
|
+
readonly frameOpcode: string
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Returns the number of payload bytes currently accumulated in the internal receive buffer.
|
|
193
|
+
*
|
|
194
|
+
* The value can represent data from one frame or from multiple calls to `ReadFrame`, which is
|
|
195
|
+
* useful when receiving a fragmented message. The accumulated bytes remain available until
|
|
196
|
+
* retrieved by `GetFrameData`, `GetFrameDataSb`, or `GetFrameDataBd`.
|
|
197
|
+
*
|
|
198
|
+
* **Message length:** This is the length accumulated so far, not necessarily the final length of
|
|
199
|
+
* the complete WebSocket message. Check `FinalFrame` to determine whether the last received
|
|
200
|
+
* fragment completed the message.
|
|
201
|
+
*
|
|
202
|
+
* This property is read-only.
|
|
203
|
+
*/
|
|
204
|
+
readonly frameDataLen: number
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* `true` if the frame most recently delivered by `ReadFrame` had its WebSocket `FIN` bit set;
|
|
208
|
+
* otherwise `false`.
|
|
209
|
+
*
|
|
210
|
+
* For a fragmented data message, continue reading while this property is `false`. The fragment
|
|
211
|
+
* with `true` completes the message. Unfragmented messages have `true` on their only frame.
|
|
212
|
+
*
|
|
213
|
+
* **Control frames:** Close, Ping, and Pong are control frames and are not fragmented by the
|
|
214
|
+
* WebSocket protocol; their `FIN` bit is always set.
|
|
215
|
+
*
|
|
216
|
+
* This property is read-only.
|
|
217
|
+
*/
|
|
218
|
+
readonly finalFrame: boolean
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* `true` when the underlying WebSocket network connection is currently open; otherwise `false`.
|
|
222
|
+
*
|
|
223
|
+
* **Connection state is not a health check:** A network interruption may not be detected until
|
|
224
|
+
* the next read or write operation. Use normal I/O results—and optionally Ping/Pong—to determine
|
|
225
|
+
* whether a seemingly connected peer is still responsive.
|
|
226
|
+
*
|
|
227
|
+
* This property is read-only.
|
|
228
|
+
*/
|
|
229
|
+
readonly isConnected: boolean
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Controls whether Chilkat automatically answers an incoming Close control frame.
|
|
233
|
+
*
|
|
234
|
+
* - When `true`, an incoming Close is answered automatically if the client did not already
|
|
235
|
+
* initiate the close. After a Close has been both received and sent, Chilkat closes the
|
|
236
|
+
* underlying connection.
|
|
237
|
+
*
|
|
238
|
+
* - When `false`, the application can detect the received Close through `CloseReceived` or
|
|
239
|
+
* `FrameOpcode` and call `SendClose` itself.
|
|
240
|
+
*
|
|
241
|
+
* The default is `true`.
|
|
242
|
+
*
|
|
243
|
+
* **Closing handshake:** A peer that receives a Close and has not already sent one should respond
|
|
244
|
+
* with a Close. Automatic response is usually the safest choice unless the application must
|
|
245
|
+
* control the exact status code or timing.
|
|
246
|
+
*/
|
|
247
|
+
closeAutoRespond: boolean
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Controls automatic handling of incoming Ping control frames.
|
|
251
|
+
*
|
|
252
|
+
* - When `true`, Chilkat sends the required Pong automatically and `ReadFrame` consumes the Ping
|
|
253
|
+
* internally, continuing until another frame is available.
|
|
254
|
+
*
|
|
255
|
+
* - When `false`, the Ping can be returned to the application. Check `NeedSendPong` and call
|
|
256
|
+
* `SendPong` as soon as practical.
|
|
257
|
+
*
|
|
258
|
+
* The default is `true`.
|
|
259
|
+
*
|
|
260
|
+
* **Payload echo:** A Pong sent in response to a Ping must carry the same application data.
|
|
261
|
+
* `SendPong` automatically uses the stored payload of the unanswered Ping.
|
|
262
|
+
*/
|
|
263
|
+
pingAutoRespond: boolean
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* `true` when a Ping frame has been received but no corresponding Pong has yet been sent.
|
|
267
|
+
*
|
|
268
|
+
* This property is primarily useful when `PingAutoRespond` is `false`. Call `SendPong` as soon as
|
|
269
|
+
* practical; it automatically sends the received Ping payload in the Pong response.
|
|
270
|
+
*
|
|
271
|
+
* This property is read-only.
|
|
272
|
+
*/
|
|
273
|
+
readonly needSendPong: boolean
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* `true` after a Close control frame has been received on the current WebSocket connection.
|
|
277
|
+
*
|
|
278
|
+
* When `CloseAutoRespond` is `false`, use this property to determine whether the application
|
|
279
|
+
* needs to call `SendClose` to complete the closing handshake. The received status code and
|
|
280
|
+
* reason, if present, are available through `CloseStatusCode` and `CloseReason`.
|
|
281
|
+
*
|
|
282
|
+
* This property is read-only.
|
|
283
|
+
*/
|
|
284
|
+
readonly closeReceived: boolean
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Returns the status code contained in the received Close control frame.
|
|
288
|
+
*
|
|
289
|
+
* Returns `0` when no Close frame has been received or when the received Close frame did not
|
|
290
|
+
* include a status code.
|
|
291
|
+
*
|
|
292
|
+
* **Meaning of zero:** `0` is an API sentinel; it is not a WebSocket close status transmitted by
|
|
293
|
+
* the peer.
|
|
294
|
+
*
|
|
295
|
+
* This property is read-only.
|
|
296
|
+
*/
|
|
297
|
+
readonly closeStatusCode: number
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Returns the UTF-8 reason text contained in the received Close control frame.
|
|
301
|
+
*
|
|
302
|
+
* The value is empty when the peer supplied no reason or when no Close frame has been received. A
|
|
303
|
+
* reason is diagnostic text and should not be treated as a stable machine-readable error
|
|
304
|
+
* identifier; use `CloseStatusCode` for protocol-level handling.
|
|
305
|
+
*
|
|
306
|
+
* This property is read-only.
|
|
307
|
+
*/
|
|
308
|
+
readonly closeReason: string
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Controls whether incoming Pong control frames are hidden from the application.
|
|
312
|
+
*
|
|
313
|
+
* - When `true`, `ReadFrame` consumes Pong frames internally and continues reading until a
|
|
314
|
+
* non-Pong frame is available.
|
|
315
|
+
*
|
|
316
|
+
* - When `false`, an incoming Pong can be returned normally with `FrameOpcode` equal to `Pong`.
|
|
317
|
+
*
|
|
318
|
+
* The default is `true`. Check `PongConsumed` after `ReadFrame` to learn whether one or more Pong
|
|
319
|
+
* frames were consumed during that call.
|
|
320
|
+
*/
|
|
321
|
+
pongAutoConsume: boolean
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* `true` if the most recent call to `ReadFrame` internally consumed a Pong frame while
|
|
325
|
+
* `PongAutoConsume` was `true`.
|
|
326
|
+
*
|
|
327
|
+
* The property is reset to `false` at the beginning of each `ReadFrame` call and set to `true` if
|
|
328
|
+
* a Pong is consumed during that call.
|
|
329
|
+
*
|
|
330
|
+
* **Why unsolicited Pong is possible:** Either endpoint may send a Pong without a preceding Ping,
|
|
331
|
+
* and a response to an earlier Ping may arrive between application data frames. Automatic
|
|
332
|
+
* consumption allows ordinary read loops to ignore these control frames while still detecting
|
|
333
|
+
* that they occurred.
|
|
334
|
+
*
|
|
335
|
+
* This property is read-only.
|
|
336
|
+
*/
|
|
337
|
+
readonly pongConsumed: boolean
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* When `ReadFrame` returns `false`, this property categorizes the reason:
|
|
341
|
+
*
|
|
342
|
+
* ValueMeaning
|
|
343
|
+
*
|
|
344
|
+
* | `0` | | No failure is recorded |
|
|
345
|
+
*
|
|
346
|
+
* | `1` | | Read inactivity timeout |
|
|
347
|
+
*
|
|
348
|
+
* | `2` | | Aborted by an application callback |
|
|
349
|
+
*
|
|
350
|
+
* | `3` | | Fatal socket error or lost connection |
|
|
351
|
+
*
|
|
352
|
+
* | `4` | | Invalid WebSocket frame bytes were received |
|
|
353
|
+
*
|
|
354
|
+
* | `99` | | Unexpected catch-all failure |
|
|
355
|
+
*
|
|
356
|
+
* Use this value for programmatic branching and inspect `LastErrorText` for detailed diagnostics.
|
|
357
|
+
*
|
|
358
|
+
* This property is read-only.
|
|
359
|
+
*/
|
|
360
|
+
readonly readFrameFailReason: number
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Returns the numeric opcode of the frame most recently delivered by `ReadFrame`.
|
|
364
|
+
*
|
|
365
|
+
* ValueFrame type
|
|
366
|
+
*
|
|
367
|
+
* | `0` | | Continuation |
|
|
368
|
+
*
|
|
369
|
+
* | `1` | | Text |
|
|
370
|
+
*
|
|
371
|
+
* | `2` | | Binary |
|
|
372
|
+
*
|
|
373
|
+
* | `8` | | Close |
|
|
374
|
+
*
|
|
375
|
+
* | `9` | | Ping |
|
|
376
|
+
*
|
|
377
|
+
* | `10` | | Pong |
|
|
378
|
+
*
|
|
379
|
+
* Use `FrameOpcode` when a readable symbolic value is preferred.
|
|
380
|
+
*
|
|
381
|
+
* This property is read-only.
|
|
382
|
+
*/
|
|
383
|
+
readonly frameOpcodeInt: number
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Contains a comma-separated list of rarely needed compatibility or platform options. The default
|
|
387
|
+
* is the empty string and should normally remain unchanged.
|
|
388
|
+
*
|
|
389
|
+
* KeywordEffect
|
|
390
|
+
*
|
|
391
|
+
* | `ProtectFromVpn` | | On Android, attempts to route the connection outside an installed or
|
|
392
|
+
* active VPN. Introduced in v9.5.0.80. |
|
|
393
|
+
*
|
|
394
|
+
* **Platform-specific behavior:** This option applies only on Android. Leave the property empty
|
|
395
|
+
* on other platforms and unless bypassing the device VPN is an explicit application requirement.
|
|
396
|
+
*
|
|
397
|
+
* This property is read-only.
|
|
398
|
+
*/
|
|
399
|
+
readonly uncommonOptions: string
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Specifies the interval, in milliseconds, between `AbortCheck` event callbacks during supported
|
|
403
|
+
* blocking operations.
|
|
404
|
+
*
|
|
405
|
+
* The default is `0`, which disables periodic `AbortCheck` callbacks. Set a positive value when
|
|
406
|
+
* the application needs an opportunity to cancel a long-running send or receive operation.
|
|
407
|
+
*
|
|
408
|
+
* **Not a WebSocket heartbeat:** Despite the property name, this setting does not transmit Ping
|
|
409
|
+
* frames and does not monitor peer liveness. Use `SendPing` and Ping/Pong handling for
|
|
410
|
+
* protocol-level heartbeat behavior.
|
|
411
|
+
*/
|
|
412
|
+
heartbeatMs: number
|
|
413
|
+
|
|
414
|
+
// ---- Methods ----
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Associates this `WebSocket` object with an existing, connected `Rest` object and prepares it
|
|
418
|
+
* for a client-side WebSocket session.
|
|
419
|
+
*
|
|
420
|
+
* The opening WebSocket handshake is an HTTP `GET` upgrade request. Using `Rest` for the
|
|
421
|
+
* underlying connection allows the application to configure TLS, proxies, authentication, custom
|
|
422
|
+
* request headers, IPv6, socket options, bandwidth limits, and other connection features before
|
|
423
|
+
* the upgrade is performed.
|
|
424
|
+
*
|
|
425
|
+
* **Client-side API:** Chilkat.WebSocket initiates connections to WebSocket servers. It does not
|
|
426
|
+
* listen for incoming connections or implement a WebSocket server endpoint.
|
|
427
|
+
*
|
|
428
|
+
* **Typical opening sequence**
|
|
429
|
+
*
|
|
430
|
+
* - Connect the `Rest` object to the server.
|
|
431
|
+
*
|
|
432
|
+
* - Call `UseConnection`.
|
|
433
|
+
*
|
|
434
|
+
* - Call `AddClientHeaders`.
|
|
435
|
+
*
|
|
436
|
+
* - Send the HTTP `GET` request with the `Rest` object.
|
|
437
|
+
*
|
|
438
|
+
* - Call `ValidateServerHandshake`.
|
|
439
|
+
*
|
|
440
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
441
|
+
* {@link WebSocket.lastErrorText}.
|
|
442
|
+
*/
|
|
443
|
+
useConnection(connection: Rest): void
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Adds the standard client opening-handshake headers to the `Rest` object supplied to
|
|
447
|
+
* `UseConnection`:
|
|
448
|
+
*
|
|
449
|
+
* ```
|
|
450
|
+
* Upgrade: websocket
|
|
451
|
+
* Connection: Upgrade
|
|
452
|
+
* Sec-WebSocket-Key: ...
|
|
453
|
+
* Sec-WebSocket-Version: 13
|
|
454
|
+
* ```
|
|
455
|
+
*
|
|
456
|
+
* `Sec-WebSocket-Key` contains a newly generated client nonce used by the server to produce
|
|
457
|
+
* `Sec-WebSocket-Accept`.
|
|
458
|
+
*
|
|
459
|
+
* **Additional handshake headers:** If the server requires headers such as `Origin`,
|
|
460
|
+
* `Authorization`, cookies, or `Sec-WebSocket-Protocol`, add them through the associated `Rest`
|
|
461
|
+
* object before sending the HTTP upgrade request.
|
|
462
|
+
*
|
|
463
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
464
|
+
* {@link WebSocket.lastErrorText}.
|
|
465
|
+
*/
|
|
466
|
+
addClientHeaders(): void
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Validates the server's response to the WebSocket opening handshake sent through the associated
|
|
470
|
+
* `Rest` object.
|
|
471
|
+
*
|
|
472
|
+
* Validation checks that the server accepted the HTTP upgrade and returned the expected WebSocket
|
|
473
|
+
* handshake response, including the value derived from the client's `Sec-WebSocket-Key`. If this
|
|
474
|
+
* method returns `true`, the connection has entered the WebSocket protocol and data or control
|
|
475
|
+
* frames may be exchanged.
|
|
476
|
+
*
|
|
477
|
+
* **Call order:** Call this method only after the `Rest` object has sent the opening `GET`
|
|
478
|
+
* request and received the server's response. A successful HTTP request alone does not establish
|
|
479
|
+
* a WebSocket session; the response must also pass this validation.
|
|
480
|
+
*
|
|
481
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
482
|
+
* {@link WebSocket.lastErrorText}.
|
|
483
|
+
*/
|
|
484
|
+
validateServerHandshake(): void
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Sends one WebSocket **text data frame** containing `stringToSend`. WebSocket text data is UTF-8
|
|
488
|
+
* on the wire.
|
|
489
|
+
*
|
|
490
|
+
* - Set `finalFrame` to `true` when this frame completes the message.
|
|
491
|
+
*
|
|
492
|
+
* - Set `finalFrame` to `false` when additional frames will follow as part of the same fragmented
|
|
493
|
+
* message.
|
|
494
|
+
*
|
|
495
|
+
* For a normal unfragmented text message, call this method once with `finalFrame` set to `true`.
|
|
496
|
+
* For a fragmented message, call it repeatedly and set `true` only for the final fragment.
|
|
497
|
+
*
|
|
498
|
+
* **Frames and messages:** A WebSocket message may contain one frame or multiple fragments. Do
|
|
499
|
+
* not begin a second data message until the current fragmented message has been completed.
|
|
500
|
+
* Control frames such as Ping, Pong, and Close may occur between message fragments.
|
|
501
|
+
*
|
|
502
|
+
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
503
|
+
* {@link WebSocket.sendFrameAsync}.
|
|
504
|
+
*
|
|
505
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
506
|
+
* {@link WebSocket.lastErrorText}.
|
|
507
|
+
*/
|
|
508
|
+
sendFrame(stringToSend: string, finalFrame: boolean): void
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Asynchronous form of {@link WebSocket.sendFrame}: the same call on a native worker thread,
|
|
512
|
+
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
513
|
+
* except {@link WebSocket.abort} (which cancels it) and the {@link WebSocket.onPercentDone} /
|
|
514
|
+
* {@link WebSocket.onProgressInfo} callbacks, which report progress while it runs.
|
|
515
|
+
*
|
|
516
|
+
* The promise rejects with an Error if the call fails; the full log is in
|
|
517
|
+
* {@link WebSocket.lastErrorText}.
|
|
518
|
+
*/
|
|
519
|
+
sendFrameAsync(stringToSend: string, finalFrame: boolean): Promise<void>
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Reads the next WebSocket frame from the connected server. On success, the method updates
|
|
523
|
+
* `FrameOpcode`, `FrameOpcodeInt`, `FinalFrame`, and `FrameDataLen`.
|
|
524
|
+
*
|
|
525
|
+
* Frame payload bytes are added to an internal receive buffer. The buffer may therefore contain
|
|
526
|
+
* data accumulated by multiple calls to `ReadFrame`. Retrieve and clear it with `GetFrameData`,
|
|
527
|
+
* `GetFrameDataSb`, or `GetFrameDataBd`.
|
|
528
|
+
*
|
|
529
|
+
* **Reading a complete message**
|
|
530
|
+
*
|
|
531
|
+
* Call `ReadFrame` until `FinalFrame` is `true`, then retrieve the accumulated message data. A
|
|
532
|
+
* fragmented message begins with a Text or Binary frame and continues with one or more
|
|
533
|
+
* Continuation frames.
|
|
534
|
+
*
|
|
535
|
+
* **Control-frame automation:** Depending on `PingAutoRespond` and `PongAutoConsume`, incoming
|
|
536
|
+
* Ping and Pong frames may be handled internally, causing this method to continue reading until
|
|
537
|
+
* another frame is available. If the method returns `false`, inspect `ReadFrameFailReason` and
|
|
538
|
+
* `LastErrorText`.
|
|
539
|
+
*
|
|
540
|
+
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
541
|
+
* {@link WebSocket.readFrameAsync}.
|
|
542
|
+
*
|
|
543
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
544
|
+
* {@link WebSocket.lastErrorText}.
|
|
545
|
+
*/
|
|
546
|
+
readFrame(): void
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Asynchronous form of {@link WebSocket.readFrame}: the same call on a native worker thread,
|
|
550
|
+
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
551
|
+
* except {@link WebSocket.abort} (which cancels it) and the {@link WebSocket.onPercentDone} /
|
|
552
|
+
* {@link WebSocket.onProgressInfo} callbacks, which report progress while it runs.
|
|
553
|
+
*
|
|
554
|
+
* The promise rejects with an Error if the call fails; the full log is in
|
|
555
|
+
* {@link WebSocket.lastErrorText}.
|
|
556
|
+
*/
|
|
557
|
+
readFrameAsync(): Promise<void>
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Returns the bytes accumulated by successful calls to `ReadFrame` as a string, then clears the
|
|
561
|
+
* internal receive buffer.
|
|
562
|
+
*
|
|
563
|
+
* This method is intended for WebSocket text-message data. For arbitrary binary payloads, use
|
|
564
|
+
* `GetFrameDataBd` to avoid interpreting binary bytes as text.
|
|
565
|
+
*
|
|
566
|
+
* **Fragmented messages:** To retrieve an entire fragmented message, continue calling `ReadFrame`
|
|
567
|
+
* until `FinalFrame` is `true`, and then call `GetFrameData` once. Calling this method earlier
|
|
568
|
+
* returns and clears only the data accumulated so far.
|
|
569
|
+
*
|
|
570
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
571
|
+
* {@link WebSocket.lastErrorText}.
|
|
572
|
+
*/
|
|
573
|
+
getFrameData(): string
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Appends the bytes accumulated by successful calls to `ReadFrame` to `binData`, then clears the
|
|
577
|
+
* internal receive buffer.
|
|
578
|
+
*
|
|
579
|
+
* Use this method for binary messages or whenever the exact received bytes must be preserved.
|
|
580
|
+
* Existing data in the destination `BinData` is retained because the received bytes are appended.
|
|
581
|
+
*
|
|
582
|
+
* **Receive-buffer ownership:** Calling any one of `GetFrameData`, `GetFrameDataSb`, or
|
|
583
|
+
* `GetFrameDataBd` consumes the same internal buffer. Retrieve the data using only the form
|
|
584
|
+
* needed by the application.
|
|
585
|
+
*
|
|
586
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
587
|
+
* {@link WebSocket.lastErrorText}.
|
|
588
|
+
*/
|
|
589
|
+
getFrameDataBd(binData: BinData): void
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Appends the text represented by the bytes accumulated by successful calls to `ReadFrame` to
|
|
593
|
+
* `sb`, then clears the internal receive buffer.
|
|
594
|
+
*
|
|
595
|
+
* Existing text in the destination `StringBuilder` is retained. This method is most appropriate
|
|
596
|
+
* for text-message data; use `GetFrameDataBd` for arbitrary binary payloads.
|
|
597
|
+
*
|
|
598
|
+
* **Fragmented messages:** The receive buffer can accumulate multiple frames. Read until
|
|
599
|
+
* `FinalFrame` is `true` before calling this method when the application wants the complete
|
|
600
|
+
* message.
|
|
601
|
+
*
|
|
602
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
603
|
+
* {@link WebSocket.lastErrorText}.
|
|
604
|
+
*/
|
|
605
|
+
getFrameDataSb(sb: StringBuilder): void
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Sends one WebSocket **text data frame** containing the current contents of `sbToSend`.
|
|
609
|
+
*
|
|
610
|
+
* - Set `finalFrame` to `true` when this frame completes the message.
|
|
611
|
+
*
|
|
612
|
+
* - Set `finalFrame` to `false` when more fragments will follow.
|
|
613
|
+
*
|
|
614
|
+
* For an ordinary single-frame text message, set `finalFrame` to `true`. WebSocket text data is
|
|
615
|
+
* UTF-8 on the wire.
|
|
616
|
+
*
|
|
617
|
+
* **Message fragmentation:** Repeated calls with `finalFrame` set to `false` create fragments of
|
|
618
|
+
* the same text message. Complete the message with a final call that passes `true`.
|
|
619
|
+
*
|
|
620
|
+
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
621
|
+
* {@link WebSocket.sendFrameSbAsync}.
|
|
622
|
+
*
|
|
623
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
624
|
+
* {@link WebSocket.lastErrorText}.
|
|
625
|
+
*/
|
|
626
|
+
sendFrameSb(sbToSend: StringBuilder, finalFrame: boolean): void
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Asynchronous form of {@link WebSocket.sendFrameSb}: the same call on a native worker thread,
|
|
630
|
+
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
631
|
+
* except {@link WebSocket.abort} (which cancels it) and the {@link WebSocket.onPercentDone} /
|
|
632
|
+
* {@link WebSocket.onProgressInfo} callbacks, which report progress while it runs.
|
|
633
|
+
*
|
|
634
|
+
* The promise rejects with an Error if the call fails; the full log is in
|
|
635
|
+
* {@link WebSocket.lastErrorText}.
|
|
636
|
+
*/
|
|
637
|
+
sendFrameSbAsync(sbToSend: StringBuilder, finalFrame: boolean): Promise<void>
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Sends one WebSocket **binary data frame** containing the current bytes in `bdToSend`.
|
|
641
|
+
*
|
|
642
|
+
* - Set `finalFrame` to `true` when this frame completes the binary message.
|
|
643
|
+
*
|
|
644
|
+
* - Set `finalFrame` to `false` when additional binary-message fragments will follow.
|
|
645
|
+
*
|
|
646
|
+
* For an ordinary single-frame binary message, set `finalFrame` to `true`.
|
|
647
|
+
*
|
|
648
|
+
* **Exact bytes:** No text encoding is involved. The bytes stored in `bdToSend` become the frame
|
|
649
|
+
* payload, while Chilkat applies the client-side WebSocket framing and masking required by the
|
|
650
|
+
* protocol.
|
|
651
|
+
*
|
|
652
|
+
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
653
|
+
* {@link WebSocket.sendFrameBdAsync}.
|
|
654
|
+
*
|
|
655
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
656
|
+
* {@link WebSocket.lastErrorText}.
|
|
657
|
+
*/
|
|
658
|
+
sendFrameBd(bdToSend: BinData, finalFrame: boolean): void
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Asynchronous form of {@link WebSocket.sendFrameBd}: the same call on a native worker thread,
|
|
662
|
+
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
663
|
+
* except {@link WebSocket.abort} (which cancels it) and the {@link WebSocket.onPercentDone} /
|
|
664
|
+
* {@link WebSocket.onProgressInfo} callbacks, which report progress while it runs.
|
|
665
|
+
*
|
|
666
|
+
* The promise rejects with an Error if the call fails; the full log is in
|
|
667
|
+
* {@link WebSocket.lastErrorText}.
|
|
668
|
+
*/
|
|
669
|
+
sendFrameBdAsync(bdToSend: BinData, finalFrame: boolean): Promise<void>
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* Checks whether bytes are currently waiting to be read from the underlying WebSocket connection.
|
|
673
|
+
*
|
|
674
|
+
* Returns `true` when incoming data is available and `false` when no data is presently waiting.
|
|
675
|
+
*
|
|
676
|
+
* **Polling is only a snapshot:** A `true` result does not mean that an entire WebSocket frame or
|
|
677
|
+
* message has arrived. Call `ReadFrame` to parse the protocol frame. A `false` result does not
|
|
678
|
+
* indicate that the peer will not send data later.
|
|
679
|
+
*/
|
|
680
|
+
pollDataAvailable(): boolean
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Sends a WebSocket Ping control frame. If `pingData` is non-empty, its UTF-8 bytes are included
|
|
684
|
+
* as the Ping payload.
|
|
685
|
+
*
|
|
686
|
+
* WebSocket control-frame payloads are limited to 125 bytes. If the UTF-8 representation exceeds
|
|
687
|
+
* this limit, Chilkat truncates it to 125 bytes.
|
|
688
|
+
*
|
|
689
|
+
* **Ping/Pong behavior:** A peer that receives a Ping is expected to send a Pong containing the
|
|
690
|
+
* same application data as soon as practical. Ping is useful for protocol-level liveness checks,
|
|
691
|
+
* but receiving a Pong does not by itself prove that the application running above the connection
|
|
692
|
+
* is healthy.
|
|
693
|
+
*
|
|
694
|
+
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
695
|
+
* {@link WebSocket.sendPingAsync}.
|
|
696
|
+
*
|
|
697
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
698
|
+
* {@link WebSocket.lastErrorText}.
|
|
699
|
+
*/
|
|
700
|
+
sendPing(pingData: string): void
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Asynchronous form of {@link WebSocket.sendPing}: the same call on a native worker thread,
|
|
704
|
+
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
705
|
+
* except {@link WebSocket.abort} (which cancels it) and the {@link WebSocket.onPercentDone} /
|
|
706
|
+
* {@link WebSocket.onProgressInfo} callbacks, which report progress while it runs.
|
|
707
|
+
*
|
|
708
|
+
* The promise rejects with an Error if the call fails; the full log is in
|
|
709
|
+
* {@link WebSocket.lastErrorText}.
|
|
710
|
+
*/
|
|
711
|
+
sendPingAsync(pingData: string): Promise<void>
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* Sends a WebSocket Pong control frame.
|
|
715
|
+
*
|
|
716
|
+
* When a Ping has been received and has not yet been answered, this method automatically uses the
|
|
717
|
+
* previously received Ping payload as the Pong payload, as required for a Ping response.
|
|
718
|
+
*
|
|
719
|
+
* **Manual response mode:** This method is normally used when `PingAutoRespond` is `false` and
|
|
720
|
+
* `NeedSendPong` is `true`. When automatic Ping handling is enabled, Chilkat sends the Pong
|
|
721
|
+
* internally.
|
|
722
|
+
*
|
|
723
|
+
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
724
|
+
* {@link WebSocket.sendPongAsync}.
|
|
725
|
+
*
|
|
726
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
727
|
+
* {@link WebSocket.lastErrorText}.
|
|
728
|
+
*/
|
|
729
|
+
sendPong(): void
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Asynchronous form of {@link WebSocket.sendPong}: the same call on a native worker thread,
|
|
733
|
+
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
734
|
+
* except {@link WebSocket.abort} (which cancels it) and the {@link WebSocket.onPercentDone} /
|
|
735
|
+
* {@link WebSocket.onProgressInfo} callbacks, which report progress while it runs.
|
|
736
|
+
*
|
|
737
|
+
* The promise rejects with an Error if the call fails; the full log is in
|
|
738
|
+
* {@link WebSocket.lastErrorText}.
|
|
739
|
+
*/
|
|
740
|
+
sendPongAsync(): Promise<void>
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Sends a WebSocket Close control frame and begins or completes the closing handshake.
|
|
744
|
+
*
|
|
745
|
+
* - If `includeStatus` is `false`, the Close frame contains no status code and `statusCode` and
|
|
746
|
+
* `reason` are ignored.
|
|
747
|
+
*
|
|
748
|
+
* - If `includeStatus` is `true`, the frame contains `statusCode` followed by the UTF-8 bytes of
|
|
749
|
+
* `reason`.
|
|
750
|
+
*
|
|
751
|
+
* The complete Close payload cannot exceed 125 bytes, leaving at most 123 bytes for the UTF-8
|
|
752
|
+
* reason after the two-byte status code. Chilkat truncates an overlong reason. The API accepts
|
|
753
|
+
* status-code integers from 0 through 16383.
|
|
754
|
+
*
|
|
755
|
+
* **Protocol-valid status codes:** The API's numeric range is broader than the set valid for
|
|
756
|
+
* transmission under RFC 6455. Use a defined protocol code such as `1000` for normal closure, or
|
|
757
|
+
* an appropriate application code in the `3000`–`4999` range. Codes `1005`, `1006`, and `1015`
|
|
758
|
+
* are reserved reporting values and must not be sent in a Close frame.
|
|
759
|
+
*
|
|
760
|
+
* **Clean close:** After initiating a close, read the peer's Close response. If this method
|
|
761
|
+
* answers a Close already received from the server, Chilkat also closes the underlying connection
|
|
762
|
+
* after sending the response.
|
|
763
|
+
*
|
|
764
|
+
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
765
|
+
* {@link WebSocket.sendCloseAsync}.
|
|
766
|
+
*
|
|
767
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
768
|
+
* {@link WebSocket.lastErrorText}.
|
|
769
|
+
*/
|
|
770
|
+
sendClose(includeStatus: boolean, statusCode: number, reason: string): void
|
|
771
|
+
|
|
772
|
+
/**
|
|
773
|
+
* Asynchronous form of {@link WebSocket.sendClose}: the same call on a native worker thread,
|
|
774
|
+
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
775
|
+
* except {@link WebSocket.abort} (which cancels it) and the {@link WebSocket.onPercentDone} /
|
|
776
|
+
* {@link WebSocket.onProgressInfo} callbacks, which report progress while it runs.
|
|
777
|
+
*
|
|
778
|
+
* The promise rejects with an Error if the call fails; the full log is in
|
|
779
|
+
* {@link WebSocket.lastErrorText}.
|
|
780
|
+
*/
|
|
781
|
+
sendCloseAsync(includeStatus: boolean, statusCode: number, reason: string): Promise<void>
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* Immediately closes the underlying network connection without completing the WebSocket closing
|
|
785
|
+
* handshake.
|
|
786
|
+
*
|
|
787
|
+
* Use this method when the connection must be abandoned because of a fatal error, timeout,
|
|
788
|
+
* application shutdown, or an unresponsive peer.
|
|
789
|
+
*
|
|
790
|
+
* **Preferred shutdown:** For a normal shutdown, call `SendClose`, receive the peer's Close frame
|
|
791
|
+
* with `ReadFrame`, and allow the closing handshake to complete. An abrupt transport close does
|
|
792
|
+
* not provide the peer with a WebSocket status code or reason.
|
|
793
|
+
*
|
|
794
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
795
|
+
* {@link WebSocket.lastErrorText}.
|
|
796
|
+
*/
|
|
797
|
+
closeConnection(): void
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Causes the calling `WebSocket` object to share the already-established WebSocket connection
|
|
801
|
+
* owned by `ws`.
|
|
802
|
+
*
|
|
803
|
+
* This enables a bidirectional design in which separate `WebSocket` objects operate on the same
|
|
804
|
+
* connection—for example, one thread blocks in `ReadFrame` while another thread sends frames.
|
|
805
|
+
*
|
|
806
|
+
* **Concurrency model:** Use this feature to separate the read path from the write path. The
|
|
807
|
+
* application remains responsible for coordinating object lifetime, shutdown, and higher-level
|
|
808
|
+
* message state. Avoid multiple concurrent readers or multiple unsynchronized writers unless the
|
|
809
|
+
* application provides its own coordination.
|
|
810
|
+
*
|
|
811
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
812
|
+
* {@link WebSocket.lastErrorText}.
|
|
813
|
+
*/
|
|
814
|
+
shareConnection(ws: WebSocket): void
|
|
815
|
+
|
|
816
|
+
// ---- Events (ReactNativeGen_DESIGN.md §6) ----
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Called with the percent completed (0..100) while a long-running method runs, when Chilkat
|
|
820
|
+
* can measure progress. Runs on the JavaScript thread, so it is only useful with the
|
|
821
|
+
* `...Async` methods (during a synchronous call the thread is busy and the events arrive
|
|
822
|
+
* after it returns). Assign `undefined` to remove.
|
|
823
|
+
*/
|
|
824
|
+
onPercentDone?: (pctDone: number) => void
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Called with a name/value pair of progress information while a long-running method runs
|
|
828
|
+
* (what is reported depends on the class and method). Runs on the JavaScript thread; see
|
|
829
|
+
* {@link WebSocket.onPercentDone}. Assign `undefined` to remove.
|
|
830
|
+
*/
|
|
831
|
+
onProgressInfo?: (name: string, value: string) => void
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* Requests that the pending `...Async` call on this object stop at its next progress check.
|
|
835
|
+
* The promise then rejects with Chilkat's abort error. Chilkat checks at least every
|
|
836
|
+
* `heartbeatMs` milliseconds on the classes that have that property, so set it (e.g. 250)
|
|
837
|
+
* for a responsive cancel. Harmless when nothing is pending.
|
|
838
|
+
*/
|
|
839
|
+
abort(): void
|
|
840
|
+
}
|