javonet-ruby-sdk 2.5.0 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Clr/Javonet.Clr.Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Clr/JavonetClrRuntime.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Jvm/JavonetJvmRuntime.jar +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/dynamicCompilationHeaders/Linux/jni.h +1960 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/dynamicCompilationHeaders/Linux/jni_md.h +51 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/dynamicCompilationHeaders/MacOs/jni.h +1960 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/dynamicCompilationHeaders/MacOs/jni_md.h +51 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/dynamicCompilationHeaders/Windows/jni.h +1960 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/dynamicCompilationHeaders/Windows/jni_md.h +37 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetActivationService.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetCppRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetGoRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetJvmRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetNetcoreRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetPythonRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetRuby278RuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetRubyRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetTcpClient.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetTcpTlsClient.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libUtils.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/NativeUtilsUnitTests.xml +18 -18
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetActivationService.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetCppRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetGoRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetJvmRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNetcoreRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejs1816RuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejsRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetPerlRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetPythonRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetRuby278RuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetRubyRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetTcpClient.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetTcpTlsClient.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libUtils.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libnethost.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libJavonetActivationService.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libJavonetTcpTlsClient.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libUtils.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetActivationService.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetCppRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetGoRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetJvmRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNetcoreRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejs1816RuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejsRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetPerlRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetPythonRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetRuby278RuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetRubyRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetTcpClient.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetTcpTlsClient.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libnethost.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetActivationService.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetCppRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetGoRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetJvmRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetNetcoreRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPythonRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRuby278RuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRubyRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpTlsClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/NetVersion31LatestPatch.runtimeconfig.json +10 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/NetVersion60LatestPatch.runtimeconfig.json +10 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/NetVersion70LatestPatch.runtimeconfig.json +10 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/NetVersion80LatestPatch.runtimeconfig.json +10 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/NetVersionLatest.runtimeconfig.json +10 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/dynamicCompilationHeaders/Linux/jni.h +1960 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/dynamicCompilationHeaders/Linux/jni_md.h +51 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/dynamicCompilationHeaders/MacOs/jni.h +1960 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/dynamicCompilationHeaders/MacOs/jni_md.h +51 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/dynamicCompilationHeaders/Windows/jni.h +1960 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/dynamicCompilationHeaders/Windows/jni_md.h +37 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/libcrypto-3-arm64.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/libssl-3-arm64.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/libxml2.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/libxmlsec-openssl.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/libxmlsec.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/libxslt.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/nethost.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/python312.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/version.txt +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetActivationService.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetClrRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetCppRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetGoRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetJvmRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNetcoreRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejs1816RuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejsRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPerlRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPythonRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRuby278RuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRubyRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpTlsClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetActivationService.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetClrRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetCppRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetGoRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetJvmRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetNetcoreRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPythonRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpTlsClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Core.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/interpreter/Interpreter.js +43 -24
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/protocol/CommandSerializer.js +7 -31
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/receiver/Receiver.js +6 -1
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/transmitter/Transmitter.js +2 -14
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/webSocketClient/WebSocketClient.js +133 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/ConnectionType.js +2 -1
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/connectionData/IConnectionData.js +17 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/connectionData/InMemoryConnectionData.js +28 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/{TcpConnectionData.js → connectionData/TcpConnectionData.js} +26 -6
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/connectionData/WsConnectionData.js +33 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/List/Util/XS.pm +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/List/Util.pm +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/Scalar/List/Utils.pm +43 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/Scalar/Util.pm +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/Sub/Util.pm +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Class/Load/XS/XS.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Data/UUID/UUID.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/FFI/Platypus/Platypus.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/List/Util/Util.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Moose/Moose.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/PPI/XS/XS.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Package/Stash/XS/XS.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Params/Util/Util.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Want/Want.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/share/dist/FFI-Platypus/lib/libplfill.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod +89 -89
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Transmitter/PerlTransmitterWrapper.pm +12 -1
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Data/UUID/UUID.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/PPI/XS/XS.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Scalar/Util/Numeric/Numeric.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Want/Want.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/autobox/autobox.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/perllocal.pod +19 -19
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Transmitter/PerlTransmitterWrapper.pm +12 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/internal/__pycache__/PythonStringBuilder.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/internal/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/CreateClassInstanceHandler.py +1 -7
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/GetTypeHandler.py +4 -3
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractCommandHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetItemHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetRankHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetSizeHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArraySetItemHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CastingHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CreateClassInstanceHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/DestructReferenceHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableNamespaceHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableTypeHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumItemHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumNameHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumValueHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceFieldHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticFieldHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetTypeHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/Handler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/HandlerDictionary.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeInstanceMethodHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeStaticMethodHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/LoadLibraryHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ResolveInstanceHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetInstanceFieldHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetStaticFieldHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ValueHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/Interpreter.py +13 -17
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/Interpreter.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/NamespaceCache.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/CommandDeserializer.py +9 -9
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandDeserializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandSerializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeDeserializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeSerializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/Receiver.py +6 -6
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/Receiver.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/ReferencesCache.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/transmitter/TransmitterWrapper.py +7 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/TypeCache.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/webSocketClient/WebSocketClient.py +0 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Command.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/CommandType.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ConnectionType.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ExceptionType.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeName.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/StringEncodingMode.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Type.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/IConnectionData.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/InMemoryConnectionData.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/ExceptionSerializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/interpreter/interpreter.rb +6 -10
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/protocol/command_deserializer.rb +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/transmitter/transmitter.rb +4 -16
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/transmitter/transmitter_wrapper.rb +12 -1
- data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/interpreter/interpreter.rb +6 -10
- data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/protocol/command_deserializer.rb +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/transmitter/transmitter.rb +4 -16
- data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/transmitter/transmitter_wrapper.rb +12 -1
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/interpreter/interpreter.rb +6 -10
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/protocol/command_deserializer.rb +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/transmitter/transmitter.rb +4 -16
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/transmitter/transmitter_wrapper.rb +12 -1
- data/lib/javonet-ruby-sdk/Binaries/version.txt +1 -1
- data/lib/javonet-ruby-sdk/core/interpreter/interpreter.rb +6 -10
- data/lib/javonet-ruby-sdk/core/protocol/command_deserializer.rb +2 -2
- data/lib/javonet-ruby-sdk/core/transmitter/transmitter.rb +4 -16
- data/lib/javonet-ruby-sdk/core/transmitter/transmitter_wrapper.rb +12 -1
- data/lib/javonet-ruby-sdk/sdk/invocation_context.rb +6 -0
- data/lib/javonet-ruby-sdk/sdk/javonet.rb +3 -3
- metadata +48 -3
data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/dynamicCompilationHeaders/Windows/jni_md.h
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) 1996, 1998, Oracle and/or its affiliates. All rights reserved.
|
3
|
+
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
4
|
+
*
|
5
|
+
*
|
6
|
+
*
|
7
|
+
*
|
8
|
+
*
|
9
|
+
*
|
10
|
+
*
|
11
|
+
*
|
12
|
+
*
|
13
|
+
*
|
14
|
+
*
|
15
|
+
*
|
16
|
+
*
|
17
|
+
*
|
18
|
+
*
|
19
|
+
*
|
20
|
+
*
|
21
|
+
*
|
22
|
+
*
|
23
|
+
*
|
24
|
+
*/
|
25
|
+
|
26
|
+
#ifndef _JAVASOFT_JNI_MD_H_
|
27
|
+
#define _JAVASOFT_JNI_MD_H_
|
28
|
+
|
29
|
+
#define JNIEXPORT __declspec(dllexport)
|
30
|
+
#define JNIIMPORT __declspec(dllimport)
|
31
|
+
#define JNICALL __stdcall
|
32
|
+
|
33
|
+
typedef long jint;
|
34
|
+
typedef __int64 jlong;
|
35
|
+
typedef signed char jbyte;
|
36
|
+
|
37
|
+
#endif /* !_JAVASOFT_JNI_MD_H_ */
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1 +1 @@
|
|
1
|
-
'2.5.
|
1
|
+
'2.5.2'
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1 +1 @@
|
|
1
|
-
'2.5.
|
1
|
+
'2.5.2'
|
Binary file
|
Binary file
|
@@ -10,36 +10,55 @@ let Receiver
|
|
10
10
|
class Interpreter {
|
11
11
|
handler = new Handler()
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
// lazy receiver loading
|
21
|
-
if (!Receiver) {
|
22
|
-
Receiver = require('../receiver/Receiver')
|
23
|
-
}
|
24
|
-
responseByteArray = Receiver.sendCommand(byteMessage)
|
13
|
+
async executeAsync(command, connectionData) {
|
14
|
+
try {
|
15
|
+
const messageByteArray = new CommandSerializer().serialize(command, connectionData)
|
16
|
+
|
17
|
+
if (connectionData.connectionType === ConnectionType.WEB_SOCKET) {
|
18
|
+
const { WebSocketClient } = require("../webSocketClient/WebSocketClient");
|
19
|
+
const wsClient = new WebSocketClient(connectionData.hostname, null)
|
25
20
|
|
21
|
+
const responseByteArray = await wsClient.send(messageByteArray)
|
22
|
+
return new CommandDeserializer(responseByteArray).deserialize()
|
23
|
+
}
|
24
|
+
else {
|
25
|
+
return this.execute(command, connectionData)
|
26
|
+
}
|
27
|
+
} catch (error) {
|
28
|
+
// TODO: handle error exception log?
|
26
29
|
}
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
30
|
+
}
|
31
|
+
|
32
|
+
execute(command, connectionData) {
|
33
|
+
try {
|
34
|
+
let messageByteArray = new CommandSerializer().serialize(command, connectionData)
|
35
|
+
let responseByteArray
|
36
|
+
|
37
|
+
if (command.runtimeName === Runtime.Nodejs && connectionData.connectionType === ConnectionType.IN_MEMORY)
|
38
|
+
{
|
39
|
+
// lazy receiver loading
|
40
|
+
if (!Receiver) {
|
41
|
+
Receiver = require('../receiver/Receiver')
|
42
|
+
}
|
43
|
+
responseByteArray = Receiver.sendCommand(messageByteArray)
|
44
|
+
|
45
|
+
}
|
46
|
+
else {
|
47
|
+
// lazy transmitter loading
|
48
|
+
if (!Transmitter) {
|
49
|
+
Transmitter = require('../transmitter/Transmitter')
|
50
|
+
}
|
51
|
+
responseByteArray = Transmitter.sendCommand(messageByteArray)
|
31
52
|
}
|
32
|
-
|
53
|
+
return new CommandDeserializer(responseByteArray).deserialize()
|
54
|
+
} catch (error) {
|
55
|
+
// TODO: handle error exception log?
|
33
56
|
}
|
34
|
-
return new CommandDeserializer(responseByteArray).deserialize()
|
35
57
|
}
|
36
58
|
|
37
|
-
process(
|
38
|
-
let
|
39
|
-
|
40
|
-
let responseCommand = this.handler.handleCommand(receivedCommand)
|
41
|
-
let commandSerializer = new CommandSerializer()
|
42
|
-
return commandSerializer.serialize(responseCommand, ConnectionType.IN_MEMORY)
|
59
|
+
process(messageByteArray) {
|
60
|
+
let receivedCommand = new CommandDeserializer(messageByteArray).deserialize()
|
61
|
+
return this.handler.handleCommand(receivedCommand)
|
43
62
|
}
|
44
63
|
}
|
45
64
|
|
@@ -1,45 +1,21 @@
|
|
1
1
|
const Command = require("../../utils/Command")
|
2
2
|
const TypeEncoder = require('./TypeSerializer')
|
3
|
-
const ConnectionType = require("../../utils/ConnectionType");
|
4
3
|
const Runtime = require('../../utils/RuntimeName')
|
5
4
|
|
6
5
|
class CommandSerializer {
|
7
6
|
buffer = new Int8Array(2)
|
8
7
|
|
9
|
-
|
8
|
+
|
9
|
+
serialize(command, connectionData, runtimeVersion = 0) {
|
10
10
|
let deque = [command]
|
11
11
|
this.buffer[0] = command.runtimeName
|
12
12
|
this.buffer[1] = runtimeVersion
|
13
|
-
this.#insertIntoBuffer(
|
13
|
+
this.#insertIntoBuffer(connectionData.serializeConnectionData())
|
14
14
|
this.#insertIntoBuffer(new Int8Array([Runtime.Nodejs, command.commandType]))
|
15
|
-
return this.#
|
16
|
-
}
|
17
|
-
|
18
|
-
#serialize_tcp = function(connectionType, tcpConnectionData) {
|
19
|
-
let encodedTcp = new Int8Array(7)
|
20
|
-
encodedTcp[0] = connectionType
|
21
|
-
if (connectionType === ConnectionType.IN_MEMORY || tcpConnectionData === null) {
|
22
|
-
encodedTcp[1] = 0
|
23
|
-
encodedTcp[2] = 0
|
24
|
-
encodedTcp[3] = 0
|
25
|
-
encodedTcp[4] = 0
|
26
|
-
encodedTcp[5] = 0
|
27
|
-
encodedTcp[6] = 0
|
28
|
-
}
|
29
|
-
else if (ConnectionType.TCP === connectionType) {
|
30
|
-
let address = tcpConnectionData.getAddressBytes()
|
31
|
-
let port = tcpConnectionData.getPortBytes()
|
32
|
-
encodedTcp[1] = address[0]
|
33
|
-
encodedTcp[2] = address[1]
|
34
|
-
encodedTcp[3] = address[2]
|
35
|
-
encodedTcp[4] = address[3]
|
36
|
-
encodedTcp[5] = port[0]
|
37
|
-
encodedTcp[6] = port[1]
|
38
|
-
}
|
39
|
-
return encodedTcp
|
15
|
+
return this.#serializeRecursively(deque)
|
40
16
|
}
|
41
17
|
|
42
|
-
#
|
18
|
+
#serializeRecursively = function(deque) {
|
43
19
|
if (deque.length === 0) return this.buffer;
|
44
20
|
let cmd = deque.pop()
|
45
21
|
deque.push(cmd.dropFirstPayloadArg())
|
@@ -52,11 +28,11 @@ class CommandSerializer {
|
|
52
28
|
let result = TypeEncoder.encodePrimitive(cmd.payload[0])
|
53
29
|
this.#insertIntoBuffer(result)
|
54
30
|
}
|
55
|
-
return this.#
|
31
|
+
return this.#serializeRecursively(deque)
|
56
32
|
} else {
|
57
33
|
deque.pop()
|
58
34
|
}
|
59
|
-
return this.#
|
35
|
+
return this.#serializeRecursively(deque)
|
60
36
|
}
|
61
37
|
|
62
38
|
#insertIntoBuffer = function(arg) {
|
@@ -1,9 +1,14 @@
|
|
1
1
|
const Interpreter = require('../interpreter/Interpreter')
|
2
|
+
const CommandSerializer = require("../protocol/CommandSerializer");
|
3
|
+
const InMemoryConnectionData = require("../../utils/connectionData/InMemoryConnectionData");
|
2
4
|
const interpreter = new Interpreter()
|
3
5
|
|
4
6
|
class Receiver {
|
7
|
+
|
8
|
+
static connectionData = new InMemoryConnectionData();
|
9
|
+
|
5
10
|
static sendCommand(messageByteArray) {
|
6
|
-
return interpreter.process(messageByteArray)
|
11
|
+
return new CommandSerializer().serialize(interpreter.process(messageByteArray), this.connectionData)
|
7
12
|
}
|
8
13
|
static heartBeat(messageByteArray) {
|
9
14
|
let response = new Int8Array(2)
|
@@ -6,20 +6,8 @@ class Transmitter {
|
|
6
6
|
return wrapper.sendCommand(messageArray)
|
7
7
|
}
|
8
8
|
|
9
|
-
static
|
10
|
-
return wrapper.activate(licenseKey,
|
11
|
-
}
|
12
|
-
|
13
|
-
static activateWithLicenseFile() {
|
14
|
-
return this.#activate()
|
15
|
-
}
|
16
|
-
|
17
|
-
static activateWithCredentials(licenseKey) {
|
18
|
-
return this.#activate(licenseKey)
|
19
|
-
}
|
20
|
-
|
21
|
-
static activateWithCredentialsAndProxy(licenseKey, proxyHost, proxyUserName, proxyUserPassword) {
|
22
|
-
return this.#activate(licenseKey, proxyHost, proxyUserName, proxyUserPassword)
|
9
|
+
static activate = function(licenseKey = "") {
|
10
|
+
return wrapper.activate(licenseKey, "", "", "")
|
23
11
|
}
|
24
12
|
|
25
13
|
static setConfigSource(configSource) {
|
@@ -0,0 +1,133 @@
|
|
1
|
+
const WebSocket = require('ws');
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Enum for WebSocket states.
|
5
|
+
* @readonly
|
6
|
+
* @enum {string}
|
7
|
+
*/
|
8
|
+
const WebSocketStateEnum = {
|
9
|
+
OPEN: 'open',
|
10
|
+
CLOSE: 'close',
|
11
|
+
ERROR: 'error',
|
12
|
+
};
|
13
|
+
|
14
|
+
/**
|
15
|
+
* WebSocketClient class that handles WebSocket connection, message sending, and automatic disconnection.
|
16
|
+
*/
|
17
|
+
class WebSocketClient {
|
18
|
+
/**
|
19
|
+
* @param {string} url
|
20
|
+
* @param {object} options
|
21
|
+
*/
|
22
|
+
constructor(url, options) {
|
23
|
+
/**
|
24
|
+
* @type {string}
|
25
|
+
*/
|
26
|
+
this.url = url;
|
27
|
+
|
28
|
+
/**
|
29
|
+
* @type {WebSocket | null}
|
30
|
+
*/
|
31
|
+
this.instance = null;
|
32
|
+
|
33
|
+
/**
|
34
|
+
* @type {boolean} isConnected indicates whether the WebSocket is connected.
|
35
|
+
*/
|
36
|
+
this.isConnected = false;
|
37
|
+
|
38
|
+
/**
|
39
|
+
* @type {boolean}
|
40
|
+
*/
|
41
|
+
this.isDisconnectedAfterMessage = options?.isDisconnectedAfterMessage ?? false;
|
42
|
+
}
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Sends data through websocket connection
|
46
|
+
* @async
|
47
|
+
* @param {Buffer|ArrayBuffer|Buffer[]} data
|
48
|
+
* @returns {Promise<Buffer|ArrayBuffer|Buffer[]>}
|
49
|
+
*/
|
50
|
+
send(data) {
|
51
|
+
return new Promise((resolve, reject) => {
|
52
|
+
try {
|
53
|
+
if (this.isConnected) {
|
54
|
+
this._sendMessage(data, resolve, reject);
|
55
|
+
} else {
|
56
|
+
this._connect().then(() => {
|
57
|
+
this._sendMessage(data, resolve, reject);
|
58
|
+
});
|
59
|
+
}
|
60
|
+
} catch (error) {
|
61
|
+
reject(error);
|
62
|
+
}
|
63
|
+
});
|
64
|
+
}
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Disconnects the WebSocket by terminating the connection.
|
68
|
+
*/
|
69
|
+
disconnect() {
|
70
|
+
if (this.instance) {
|
71
|
+
this.instance.terminate();
|
72
|
+
}
|
73
|
+
this.isConnected = false;
|
74
|
+
}
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Connects to the WebSocket server.
|
78
|
+
* @private
|
79
|
+
* @async
|
80
|
+
* @returns {Promise<void>} - A promise that resolves when the connection is established.
|
81
|
+
*/
|
82
|
+
_connect() {
|
83
|
+
return new Promise((resolve, reject) => {
|
84
|
+
this.instance = new WebSocket(this.url);
|
85
|
+
|
86
|
+
this.instance.on(WebSocketStateEnum.OPEN, () => {
|
87
|
+
console.log('[WebSocketClient] connected');
|
88
|
+
this.isConnected = true;
|
89
|
+
resolve();
|
90
|
+
});
|
91
|
+
|
92
|
+
this.instance.on(WebSocketStateEnum.ERROR, (error) => {
|
93
|
+
console.log('[WebSocketClient] error', error);
|
94
|
+
reject(error);
|
95
|
+
});
|
96
|
+
|
97
|
+
this.instance.on(WebSocketStateEnum.CLOSE, () => {
|
98
|
+
console.log('[WebSocketClient] closed');
|
99
|
+
this.isConnected = false;
|
100
|
+
});
|
101
|
+
});
|
102
|
+
}
|
103
|
+
|
104
|
+
/**
|
105
|
+
* Sends the data to the WebSocket server and listens for a response.
|
106
|
+
* @private
|
107
|
+
* @async
|
108
|
+
* @param {string|Buffer|ArrayBuffer|Buffer[]} data - The data to send.
|
109
|
+
* @param {Function} resolve - The resolve function for the Promise.
|
110
|
+
* @param {Function} reject - The reject function for the Promise.
|
111
|
+
*/
|
112
|
+
_sendMessage(data, resolve, reject) {
|
113
|
+
this.instance.send(data, (err) => {
|
114
|
+
if (err) {
|
115
|
+
reject(err);
|
116
|
+
}
|
117
|
+
});
|
118
|
+
|
119
|
+
this.instance.on('message', (message) => {
|
120
|
+
resolve(message);
|
121
|
+
|
122
|
+
if (this.isDisconnectedAfterMessage) {
|
123
|
+
this.disconnect();
|
124
|
+
}
|
125
|
+
});
|
126
|
+
|
127
|
+
this.instance.on('error', (error) => {
|
128
|
+
reject(error);
|
129
|
+
});
|
130
|
+
}
|
131
|
+
}
|
132
|
+
|
133
|
+
module.exports = { WebSocketClient }
|
@@ -0,0 +1,17 @@
|
|
1
|
+
const ConnectionType = require('../../utils/ConnectionType');
|
2
|
+
|
3
|
+
class IConnectionData {
|
4
|
+
get connectionType() {
|
5
|
+
throw new Error('You have to implement the method connectionType!');
|
6
|
+
}
|
7
|
+
|
8
|
+
get hostname() {
|
9
|
+
throw new Error('You have to implement the method hostname!');
|
10
|
+
}
|
11
|
+
|
12
|
+
serializeConnectionData() {
|
13
|
+
throw new Error('You have to implement the method serializeConnectionData!');
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
module.exports = IConnectionData;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
const ConnectionType = require('../../utils/ConnectionType');
|
2
|
+
const IConnectionData = require('./IConnectionData');
|
3
|
+
|
4
|
+
class InMemoryConnectionData extends IConnectionData {
|
5
|
+
constructor() {
|
6
|
+
super();
|
7
|
+
this._connectionType = ConnectionType.IN_MEMORY;
|
8
|
+
this._hostname = ""
|
9
|
+
}
|
10
|
+
|
11
|
+
get connectionType() {
|
12
|
+
return this._connectionType;
|
13
|
+
}
|
14
|
+
|
15
|
+
get hostname() {
|
16
|
+
return this._hostname;
|
17
|
+
}
|
18
|
+
|
19
|
+
serializeConnectionData() {
|
20
|
+
return [this.connectionType, 0, 0, 0, 0, 0, 0];
|
21
|
+
}
|
22
|
+
|
23
|
+
equals(other) {
|
24
|
+
return other instanceof InMemoryConnectionData;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
module.exports = InMemoryConnectionData;
|
@@ -1,9 +1,14 @@
|
|
1
1
|
const dns = require('dns');
|
2
|
+
const ConnectionType = require('../../utils/ConnectionType');
|
3
|
+
const IConnectionData = require("./IConnectionData");
|
2
4
|
|
3
|
-
class TcpConnectionData {
|
5
|
+
class TcpConnectionData extends IConnectionData{
|
4
6
|
|
5
7
|
constructor(hostname, port) {
|
6
|
-
|
8
|
+
super();
|
9
|
+
this._port = port;
|
10
|
+
this._hostname = hostname;
|
11
|
+
this._connectionType = ConnectionType.TCP;
|
7
12
|
if (hostname === "localhost") {
|
8
13
|
this.ipAddress = "127.0.0.1";
|
9
14
|
} else {
|
@@ -11,9 +16,17 @@ class TcpConnectionData {
|
|
11
16
|
}
|
12
17
|
}
|
13
18
|
|
19
|
+
get connectionType() {
|
20
|
+
return this._connectionType;
|
21
|
+
}
|
22
|
+
|
23
|
+
get hostname() {
|
24
|
+
return this._hostname;
|
25
|
+
}
|
26
|
+
|
14
27
|
equals(other) {
|
15
28
|
if (other instanceof TcpConnectionData) {
|
16
|
-
return this.ipAddress === other.ipAddress && this.
|
29
|
+
return this.ipAddress === other.ipAddress && this._port === other._port;
|
17
30
|
}
|
18
31
|
return false;
|
19
32
|
}
|
@@ -36,12 +49,19 @@ class TcpConnectionData {
|
|
36
49
|
}
|
37
50
|
}
|
38
51
|
|
39
|
-
|
52
|
+
serializeConnectionData() {
|
53
|
+
let result = [this.connectionType];
|
54
|
+
result = result.concat(this.#getAddressBytes());
|
55
|
+
result = result.concat(this.#getPortBytes());
|
56
|
+
return result;
|
57
|
+
}
|
58
|
+
|
59
|
+
#getAddressBytes() {
|
40
60
|
return this.ipAddress.split('.').map(Number);
|
41
61
|
}
|
42
62
|
|
43
|
-
getPortBytes() {
|
44
|
-
return [this.
|
63
|
+
#getPortBytes() {
|
64
|
+
return [this._port & 0xFF, this._port >> 8];
|
45
65
|
}
|
46
66
|
|
47
67
|
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
const ConnectionType = require('../../utils/ConnectionType');
|
2
|
+
const IConnectionData = require('./IConnectionData');
|
3
|
+
|
4
|
+
class WsConnectionData extends IConnectionData {
|
5
|
+
constructor(hostname) {
|
6
|
+
super();
|
7
|
+
this._hostname = hostname;
|
8
|
+
this._connectionType = ConnectionType.WEB_SOCKET;
|
9
|
+
}
|
10
|
+
|
11
|
+
get connectionType() {
|
12
|
+
return this._connectionType;
|
13
|
+
}
|
14
|
+
|
15
|
+
get hostname() {
|
16
|
+
return this._hostname;
|
17
|
+
}
|
18
|
+
|
19
|
+
set hostname(value) {
|
20
|
+
this._hostname = value;
|
21
|
+
}
|
22
|
+
|
23
|
+
serializeConnectionData() {
|
24
|
+
return [this.connectionType, 0, 0, 0, 0, 0, 0];
|
25
|
+
}
|
26
|
+
|
27
|
+
equals(other) {
|
28
|
+
return other instanceof WsConnectionData && this._hostname === other.hostname;
|
29
|
+
}
|
30
|
+
|
31
|
+
}
|
32
|
+
|
33
|
+
module.exports = WsConnectionData;
|
@@ -16,7 +16,7 @@ our @EXPORT_OK = qw(
|
|
16
16
|
sample shuffle uniq uniqint uniqnum uniqstr zip zip_longest zip_shortest mesh mesh_longest mesh_shortest
|
17
17
|
head tail pairs unpairs pairkeys pairvalues pairmap pairgrep pairfirst
|
18
18
|
);
|
19
|
-
our $VERSION = "1.
|
19
|
+
our $VERSION = "1.68";
|
20
20
|
our $XS_VERSION = $VERSION;
|
21
21
|
$VERSION =~ tr/_//d;
|
22
22
|
|