hypertube-binaries 3.0.3 → 3.0.4

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.
Files changed (120) hide show
  1. package/Binaries/Clr/Hypertube.Clr.Utils.dll +0 -0
  2. package/Binaries/Clr/HypertubeClrRuntime.dll +0 -0
  3. package/Binaries/Jvm/HypertubeJvmRuntime.jar +0 -0
  4. package/Binaries/Native/Linux/ARM64/_HypertubeNativeErrorLogger_2026-05-06.txt +124 -0
  5. package/Binaries/Native/Linux/ARM64/libConfigs.so +0 -0
  6. package/Binaries/Native/Linux/ARM64/libHypertubeActivationService.so +0 -0
  7. package/Binaries/Native/Linux/ARM64/libHypertubeCppRuntimeNative.so +0 -0
  8. package/Binaries/Native/Linux/ARM64/libHypertubeGoRuntimeNative.so +0 -0
  9. package/Binaries/Native/Linux/ARM64/libHypertubeJvmRuntimeNative.so +0 -0
  10. package/Binaries/Native/Linux/ARM64/libHypertubeNetcoreRuntimeNative.so +0 -0
  11. package/Binaries/Native/Linux/ARM64/libHypertubePhpRuntimeNative.so +0 -0
  12. package/Binaries/Native/Linux/ARM64/libHypertubePythonRuntimeNative.so +0 -0
  13. package/Binaries/Native/Linux/ARM64/libHypertubeRubyRuntimeNative.so +0 -0
  14. package/Binaries/Native/Linux/ARM64/libHypertubeTcpClient.so +0 -0
  15. package/Binaries/Native/Linux/ARM64/libHypertubeTcpTlsClient.so +0 -0
  16. package/Binaries/Native/Linux/ARM64/libUtils.so +0 -0
  17. package/Binaries/Native/Linux/ARM64/version.txt +1 -1
  18. package/Binaries/Native/Linux/X64/_HypertubeNativeErrorLogger_2026-05-06.txt +124 -0
  19. package/Binaries/Native/Linux/X64/libConfigs.so +0 -0
  20. package/Binaries/Native/Linux/X64/libHypertubeActivationService.so +0 -0
  21. package/Binaries/Native/Linux/X64/libHypertubeCppRuntimeNative.so +0 -0
  22. package/Binaries/Native/Linux/X64/libHypertubeGoRuntimeNative.so +0 -0
  23. package/Binaries/Native/Linux/X64/libHypertubeJvmRuntimeNative.so +0 -0
  24. package/Binaries/Native/Linux/X64/libHypertubeNetcoreRuntimeNative.so +0 -0
  25. package/Binaries/Native/Linux/X64/libHypertubeNodejs2218RuntimeNative.so +0 -0
  26. package/Binaries/Native/Linux/X64/libHypertubeNodejsRuntimeNative.so +0 -0
  27. package/Binaries/Native/Linux/X64/libHypertubePhp848RuntimeNative.so +0 -0
  28. package/Binaries/Native/Linux/X64/libHypertubePhpRuntimeNative.so +0 -0
  29. package/Binaries/Native/Linux/X64/libHypertubePythonRuntimeNative.so +0 -0
  30. package/Binaries/Native/Linux/X64/libHypertubeRubyRuntimeNative.so +0 -0
  31. package/Binaries/Native/Linux/X64/libHypertubeTcpClient.so +0 -0
  32. package/Binaries/Native/Linux/X64/libHypertubeTcpTlsClient.so +0 -0
  33. package/Binaries/Native/Linux/X64/libUtils.so +0 -0
  34. package/Binaries/Native/Linux/X64/version.txt +1 -1
  35. package/Binaries/Native/MacOs/ARM64/_HypertubeNativeErrorLogger_2026-05-06.txt +124 -0
  36. package/Binaries/Native/MacOs/ARM64/libConfigs.dylib +0 -0
  37. package/Binaries/Native/MacOs/ARM64/libHypertubeActivationService.dylib +0 -0
  38. package/Binaries/Native/MacOs/ARM64/libHypertubeCppRuntimeNative.dylib +0 -0
  39. package/Binaries/Native/MacOs/ARM64/libHypertubeGoRuntimeNative.dylib +0 -0
  40. package/Binaries/Native/MacOs/ARM64/libHypertubeJvmRuntimeNative.dylib +0 -0
  41. package/Binaries/Native/MacOs/ARM64/libHypertubeNetcoreRuntimeNative.dylib +0 -0
  42. package/Binaries/Native/MacOs/ARM64/libHypertubeNodejs2218RuntimeNative.dylib +0 -0
  43. package/Binaries/Native/MacOs/ARM64/libHypertubeNodejsRuntimeNative.dylib +0 -0
  44. package/Binaries/Native/MacOs/ARM64/libHypertubePythonRuntimeNative.dylib +0 -0
  45. package/Binaries/Native/MacOs/ARM64/libHypertubeRubyRuntimeNative.dylib +0 -0
  46. package/Binaries/Native/MacOs/ARM64/libHypertubeTcpClient.dylib +0 -0
  47. package/Binaries/Native/MacOs/ARM64/libHypertubeTcpTlsClient.dylib +0 -0
  48. package/Binaries/Native/MacOs/ARM64/libUtils.dylib +0 -0
  49. package/Binaries/Native/MacOs/ARM64/version.txt +1 -1
  50. package/Binaries/Native/MacOs/X64/_HypertubeNativeErrorLogger_2026-05-06.txt +124 -0
  51. package/Binaries/Native/MacOs/X64/libConfigs.dylib +0 -0
  52. package/Binaries/Native/MacOs/X64/libHypertubeActivationService.dylib +0 -0
  53. package/Binaries/Native/MacOs/X64/libHypertubeCppRuntimeNative.dylib +0 -0
  54. package/Binaries/Native/MacOs/X64/libHypertubeGoRuntimeNative.dylib +0 -0
  55. package/Binaries/Native/MacOs/X64/libHypertubeJvmRuntimeNative.dylib +0 -0
  56. package/Binaries/Native/MacOs/X64/libHypertubeNetcoreRuntimeNative.dylib +0 -0
  57. package/Binaries/Native/MacOs/X64/libHypertubeNodejs2218RuntimeNative.dylib +0 -0
  58. package/Binaries/Native/MacOs/X64/libHypertubeNodejsRuntimeNative.dylib +0 -0
  59. package/Binaries/Native/MacOs/X64/libHypertubePhp848RuntimeNative.dylib +0 -0
  60. package/Binaries/Native/MacOs/X64/libHypertubePhpRuntimeNative.dylib +0 -0
  61. package/Binaries/Native/MacOs/X64/libHypertubePythonRuntimeNative.dylib +0 -0
  62. package/Binaries/Native/MacOs/X64/libHypertubeRubyRuntimeNative.dylib +0 -0
  63. package/Binaries/Native/MacOs/X64/libHypertubeTcpClient.dylib +0 -0
  64. package/Binaries/Native/MacOs/X64/libHypertubeTcpTlsClient.dylib +0 -0
  65. package/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
  66. package/Binaries/Native/MacOs/X64/version.txt +1 -1
  67. package/Binaries/Native/Windows/ARM64/Configs.dll +0 -0
  68. package/Binaries/Native/Windows/ARM64/HypertubeActivationService.dll +0 -0
  69. package/Binaries/Native/Windows/ARM64/HypertubeCppRuntimeNative.dll +0 -0
  70. package/Binaries/Native/Windows/ARM64/HypertubeGoRuntimeNative.dll +0 -0
  71. package/Binaries/Native/Windows/ARM64/HypertubeJvmRuntimeNative.dll +0 -0
  72. package/Binaries/Native/Windows/ARM64/HypertubeNetcoreRuntimeNative.dll +0 -0
  73. package/Binaries/Native/Windows/ARM64/HypertubePhpRuntimeNative.dll +0 -0
  74. package/Binaries/Native/Windows/ARM64/HypertubePythonRuntimeNative.dll +0 -0
  75. package/Binaries/Native/Windows/ARM64/HypertubeRubyRuntimeNative.dll +0 -0
  76. package/Binaries/Native/Windows/ARM64/HypertubeTcpClient.dll +0 -0
  77. package/Binaries/Native/Windows/ARM64/HypertubeTcpTlsClient.dll +0 -0
  78. package/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
  79. package/Binaries/Native/Windows/ARM64/_HypertubeNativeErrorLogger_2026-05-06.txt +124 -0
  80. package/Binaries/Native/Windows/ARM64/version.txt +0 -0
  81. package/Binaries/Native/Windows/X64/Configs.dll +0 -0
  82. package/Binaries/Native/Windows/X64/HypertubeActivationService.dll +0 -0
  83. package/Binaries/Native/Windows/X64/HypertubeClrRuntimeNative.dll +0 -0
  84. package/Binaries/Native/Windows/X64/HypertubeCppRuntimeNative.dll +0 -0
  85. package/Binaries/Native/Windows/X64/HypertubeGoRuntimeNative.dll +0 -0
  86. package/Binaries/Native/Windows/X64/HypertubeJvmRuntimeNative.dll +0 -0
  87. package/Binaries/Native/Windows/X64/HypertubeNetcoreRuntimeNative.dll +0 -0
  88. package/Binaries/Native/Windows/X64/HypertubeNodejs2218RuntimeNative.dll +0 -0
  89. package/Binaries/Native/Windows/X64/HypertubeNodejsRuntimeNative.dll +0 -0
  90. package/Binaries/Native/Windows/X64/HypertubePhp848RuntimeNative.dll +0 -0
  91. package/Binaries/Native/Windows/X64/HypertubePhpRuntimeNative.dll +0 -0
  92. package/Binaries/Native/Windows/X64/HypertubePythonRuntimeNative.dll +0 -0
  93. package/Binaries/Native/Windows/X64/HypertubeRubyRuntimeNative.dll +0 -0
  94. package/Binaries/Native/Windows/X64/HypertubeTcpClient.dll +0 -0
  95. package/Binaries/Native/Windows/X64/HypertubeTcpTlsClient.dll +0 -0
  96. package/Binaries/Native/Windows/X64/Utils.dll +0 -0
  97. package/Binaries/Native/Windows/X64/_HypertubeNativeErrorLogger_2026-05-06.txt +124 -0
  98. package/Binaries/Native/Windows/X64/version.txt +1 -1
  99. package/Binaries/Netcore/Hypertube.Netcore.Core.dll +0 -0
  100. package/Binaries/Netcore/Hypertube.Netcore.Plugins.dll +0 -0
  101. package/Binaries/Netcore/Hypertube.Netcore.Utils.dll +0 -0
  102. package/Binaries/Php/hypertube/core/transmitter/TransmitterWrapper.php +5 -5
  103. package/Binaries/Php/hypertube/core/webSocketClient/WebSocketClient.php +3 -3
  104. package/Binaries/Php/hypertube/utils/connectiondata/TcpConnectionData.php +29 -6
  105. package/Binaries/Python/hypertube/core/webSocketClient/WebSocketClient.py +7 -1
  106. package/Binaries/Python/hypertube/utils/connectionData/TcpConnectionData.py +28 -4
  107. package/Binaries/Ruby/core/web_socket_client/web_socket_client.rb +3 -2
  108. package/Binaries/Ruby/utils/tcp_connection_data.rb +24 -4
  109. package/Binaries/version.txt +1 -1
  110. package/package.json +1 -1
  111. package/prebuilds/prebuilds-darwin-arm64/HypertubeNodejsRuntimeAddon.node +0 -0
  112. package/prebuilds/prebuilds-darwin-x64/HypertubeNodejsRuntimeAddon.node +0 -0
  113. package/prebuilds/prebuilds-win32-arm64/HypertubeNodejsRuntimeAddon.node +0 -0
  114. package/prebuilds/prebuilds-win32-x64/HypertubeNodejsRuntimeAddon.node +0 -0
  115. package/Binaries/Native/Linux/ARM64/_HypertubeNativeErrorLogger_2026-05-05.txt +0 -2
  116. package/Binaries/Native/Linux/X64/_HypertubeNativeErrorLogger_2026-05-05.txt +0 -2
  117. package/Binaries/Native/MacOs/ARM64/_HypertubeNativeErrorLogger_2026-05-05.txt +0 -2
  118. package/Binaries/Native/MacOs/X64/_HypertubeNativeErrorLogger_2026-05-05.txt +0 -2
  119. package/Binaries/Native/Windows/ARM64/_HypertubeNativeErrorLogger_2026-05-05.txt +0 -2
  120. package/Binaries/Native/Windows/X64/_HypertubeNativeErrorLogger_2026-05-05.txt +0 -2
@@ -0,0 +1,124 @@
1
+ 2026-05-06 20:28:10 Thread ID: 7296 Proxy configuration not found in configuration source. Check your configuration:
2
+ {
3
+ "licenseKey": "your-license-key"
4
+ }
5
+ 2026-05-06 20:28:11 Thread ID: 7296 Proxy configuration not found in configuration source. Check your configuration:
6
+ {
7
+ "licenseKey": "your-license-key"
8
+ }
9
+ 2026-05-06 20:28:11 Thread ID: 7296 Proxy configuration not found in configuration source. Check your configuration:
10
+ {
11
+ "licenseKey": "your-license-key"
12
+ }
13
+ 2026-05-06 20:28:11 Thread ID: 7296 Proxy configuration not found in configuration source. Check your configuration:
14
+ {
15
+ "licenseKey": "your-license-key"
16
+ }
17
+ 2026-05-06 20:28:11 Thread ID: 7296 Runtime config default not found in configuration source for runtime invalid_runtime_name. Check your configuration:
18
+ {
19
+ "licenseKey": "unit-tests-key",
20
+ "loggingLevel": "runtimeInfo",
21
+ "proxy": {
22
+ "host": "test",
23
+ "username": "test",
24
+ "password": "test",
25
+ "domain": "test"
26
+ },
27
+ "runtimes": {
28
+ "jvm": [
29
+ {
30
+ "name": "default",
31
+ "customOptions": "",
32
+ "modules": "",
33
+ "channel": {
34
+ "type": "inMemory",
35
+ "runtimePath": "/test/path/to/jvm/runtime"
36
+ }
37
+ },
38
+ {
39
+ "name": "custom1",
40
+ "customOptions": "",
41
+ "modules": "",
42
+ "channel": {
43
+ "type": "tcp",
44
+ "host": "127.0.0.1",
45
+ "port": 8083
46
+ }
47
+ }
48
+ ],
49
+ "netcore": [
50
+ {
51
+ "name": "default",
52
+ "customOptions": "",
53
+ "modules": "",
54
+ "channel": {
55
+ "type": "tcp",
56
+ "host": "127.0.0.1",
57
+ "port": 8080
58
+ }
59
+ },
60
+ {
61
+ "name": "custom1",
62
+ "customOptions": "",
63
+ "modules": "",
64
+ "channel": {
65
+ "type": "tcp",
66
+ "host": "127.0.0.1",
67
+ "port": 8081
68
+ }
69
+ }
70
+ ],
71
+ "python": [
72
+ {
73
+ "name": "default",
74
+ "customOptions": "",
75
+ "modules": "",
76
+ "channel": {
77
+ "type": "inMemory"
78
+ }
79
+ },
80
+ {
81
+ "name": "with-modules-relative",
82
+ "customOptions": "",
83
+ "modules": "../python-package",
84
+ "channel": {
85
+ "type": "inMemory"
86
+ }
87
+ }
88
+ ],
89
+ "ruby": {
90
+ "name": "default",
91
+ "customOptions": "",
92
+ "modules": "",
93
+ "channel": {
94
+ "type": "tcp",
95
+ "host": "127.0.0.1",
96
+ "port": 8082
97
+ }
98
+ },
99
+ "nodejs": {
100
+ "name": "default",
101
+ "customOptions": "",
102
+ "modules": "",
103
+ "channel": {
104
+ "type": "inMemory"
105
+ }
106
+ },
107
+ "clr": {
108
+ "name": "default",
109
+ "customOptions": "",
110
+ "modules": "",
111
+ "channel": {
112
+ "type": "inMemory"
113
+ }
114
+ },
115
+ "perl": {
116
+ "name": "default",
117
+ "customOptions": "",
118
+ "modules": "",
119
+ "channel": {
120
+ "type": "inMemory"
121
+ }
122
+ }
123
+ }
124
+ }
@@ -0,0 +1,124 @@
1
+ 2026-05-06 20:31:56 Thread ID: 6804 Proxy configuration not found in configuration source. Check your configuration:
2
+ {
3
+ "licenseKey": "your-license-key"
4
+ }
5
+ 2026-05-06 20:31:56 Thread ID: 6804 Proxy configuration not found in configuration source. Check your configuration:
6
+ {
7
+ "licenseKey": "your-license-key"
8
+ }
9
+ 2026-05-06 20:31:56 Thread ID: 6804 Proxy configuration not found in configuration source. Check your configuration:
10
+ {
11
+ "licenseKey": "your-license-key"
12
+ }
13
+ 2026-05-06 20:31:56 Thread ID: 6804 Proxy configuration not found in configuration source. Check your configuration:
14
+ {
15
+ "licenseKey": "your-license-key"
16
+ }
17
+ 2026-05-06 20:31:56 Thread ID: 6804 Runtime config default not found in configuration source for runtime invalid_runtime_name. Check your configuration:
18
+ {
19
+ "licenseKey": "unit-tests-key",
20
+ "loggingLevel": "runtimeInfo",
21
+ "proxy": {
22
+ "host": "test",
23
+ "username": "test",
24
+ "password": "test",
25
+ "domain": "test"
26
+ },
27
+ "runtimes": {
28
+ "jvm": [
29
+ {
30
+ "name": "default",
31
+ "customOptions": "",
32
+ "modules": "",
33
+ "channel": {
34
+ "type": "inMemory",
35
+ "runtimePath": "/test/path/to/jvm/runtime"
36
+ }
37
+ },
38
+ {
39
+ "name": "custom1",
40
+ "customOptions": "",
41
+ "modules": "",
42
+ "channel": {
43
+ "type": "tcp",
44
+ "host": "127.0.0.1",
45
+ "port": 8083
46
+ }
47
+ }
48
+ ],
49
+ "netcore": [
50
+ {
51
+ "name": "default",
52
+ "customOptions": "",
53
+ "modules": "",
54
+ "channel": {
55
+ "type": "tcp",
56
+ "host": "127.0.0.1",
57
+ "port": 8080
58
+ }
59
+ },
60
+ {
61
+ "name": "custom1",
62
+ "customOptions": "",
63
+ "modules": "",
64
+ "channel": {
65
+ "type": "tcp",
66
+ "host": "127.0.0.1",
67
+ "port": 8081
68
+ }
69
+ }
70
+ ],
71
+ "python": [
72
+ {
73
+ "name": "default",
74
+ "customOptions": "",
75
+ "modules": "",
76
+ "channel": {
77
+ "type": "inMemory"
78
+ }
79
+ },
80
+ {
81
+ "name": "with-modules-relative",
82
+ "customOptions": "",
83
+ "modules": "../python-package",
84
+ "channel": {
85
+ "type": "inMemory"
86
+ }
87
+ }
88
+ ],
89
+ "ruby": {
90
+ "name": "default",
91
+ "customOptions": "",
92
+ "modules": "",
93
+ "channel": {
94
+ "type": "tcp",
95
+ "host": "127.0.0.1",
96
+ "port": 8082
97
+ }
98
+ },
99
+ "nodejs": {
100
+ "name": "default",
101
+ "customOptions": "",
102
+ "modules": "",
103
+ "channel": {
104
+ "type": "inMemory"
105
+ }
106
+ },
107
+ "clr": {
108
+ "name": "default",
109
+ "customOptions": "",
110
+ "modules": "",
111
+ "channel": {
112
+ "type": "inMemory"
113
+ }
114
+ },
115
+ "perl": {
116
+ "name": "default",
117
+ "customOptions": "",
118
+ "modules": "",
119
+ "channel": {
120
+ "type": "inMemory"
121
+ }
122
+ }
123
+ }
124
+ }
@@ -1 +1 @@
1
- '3.0.3'
1
+ '3.0.4'
@@ -55,21 +55,21 @@ final class TransmitterWrapper
55
55
  {
56
56
  $archSuffix = self::detectArchitecture();
57
57
  $basePath = self::getWorkingDirectoryBasePath();
58
- $osName = strtolower(PHP_OS);
58
+ $osFamily = PHP_OS_FAMILY;
59
59
 
60
- if (strpos($osName, 'win') !== false) {
60
+ if ($osFamily === 'Windows') {
61
61
  return $basePath . '/Binaries/Native/Windows/' . $archSuffix . '/HypertubePhpRuntimeNative.dll';
62
62
  }
63
63
 
64
- if (strpos($osName, 'darwin') !== false) {
64
+ if ($osFamily === 'Darwin') {
65
65
  return $basePath . '/Binaries/Native/MacOs/' . $archSuffix . '/libHypertubePhpRuntimeNative.dylib';
66
66
  }
67
67
 
68
- if (strpos($osName, 'linux') !== false) {
68
+ if ($osFamily === 'Linux') {
69
69
  return $basePath . '/Binaries/Native/Linux/' . $archSuffix . '/libHypertubePhpRuntimeNative.so';
70
70
  }
71
71
 
72
- throw new RuntimeException('Unsupported OS: ' . $osName);
72
+ throw new RuntimeException('Unsupported OS: ' . $osFamily);
73
73
  }
74
74
 
75
75
  private static function getWorkingDirectoryBasePath(): string
@@ -15,11 +15,11 @@ final class WebSocketClient
15
15
  private const UNSECURE_PORT_NUMBER = 80;
16
16
 
17
17
  /** Timeout for TCP connect and WebSocket handshake (seconds) */
18
- private const CONNECT_TIMEOUT_SEC = 5;
18
+ private const CONNECT_TIMEOUT_SEC = 60;
19
19
 
20
20
  /** Timeout waiting for a response from the remote runtime (seconds).
21
- * Must be long enough for slow operations (e.g. GPGE package generation ~60s). */
22
- private const RESPONSE_TIMEOUT_SEC = 80;
21
+ * Must be long enough for slow operations (e.g. package generation ~60s). */
22
+ private const RESPONSE_TIMEOUT_SEC = 60;
23
23
 
24
24
  private const MAX_ATTEMPTS = 2;
25
25
 
@@ -13,16 +13,39 @@ final class TcpConnectionData extends ConnectionData
13
13
  private int $port;
14
14
  private ConnectionType $connectionType;
15
15
 
16
- public function __construct(
17
- string $hostName,
18
- int $port
19
- ) {
20
- $this->hostName = $hostName . ':' . $port;
16
+ public function __construct(string $hostname)
17
+ {
18
+ [$hostOnly, $port] = self::parseHostname($hostname);
19
+ $this->hostName = $hostOnly . ':' . $port;
21
20
  $this->port = $port;
22
- $this->ipAddress = gethostbyname($hostName);
21
+ $this->ipAddress = gethostbyname($hostOnly);
23
22
  $this->connectionType = ConnectionType::TCP();
24
23
  }
25
24
 
25
+ private static function parseHostname(string $hostname): array
26
+ {
27
+ $value = trim($hostname);
28
+ if (stripos($value, 'tcp://') === 0) {
29
+ $value = substr($value, 6);
30
+ }
31
+ if (strpos($value, '/') !== false) {
32
+ throw new \InvalidArgumentException('TCP addresses do not support route paths.');
33
+ }
34
+
35
+ $colon = strrpos($value, ':');
36
+ if ($colon === false || $colon <= 0 || $colon >= strlen($value) - 1) {
37
+ throw new \InvalidArgumentException('TCP hostname must use host:port format.');
38
+ }
39
+
40
+ $hostOnly = trim(substr($value, 0, $colon));
41
+ $port = filter_var(substr($value, $colon + 1), FILTER_VALIDATE_INT);
42
+ if ($hostOnly === '' || $port === false || $port < 0 || $port > 65535) {
43
+ throw new \InvalidArgumentException('TCP hostname must contain a non-empty host and port between 0 and 65535.');
44
+ }
45
+
46
+ return [$hostOnly, $port];
47
+ }
48
+
26
49
  public function getConnectionType(): ConnectionType
27
50
  {
28
51
  return $this->connectionType;
@@ -14,6 +14,7 @@ from hypertube.utils.connectionData.WsConnectionData import WsConnectionData
14
14
  _clients: dict[str, WebSocketClient] = {}
15
15
  _clients_lock = threading.Lock()
16
16
  MAX_ATTEMPTS = 2
17
+ DEFAULT_TIMEOUT_SECONDS = 60
17
18
 
18
19
 
19
20
  class WebSocketClient:
@@ -159,7 +160,12 @@ class WebSocketClient:
159
160
  "The connection may have been closed or never established."
160
161
  )
161
162
  try:
162
- response = self.ws.recv()
163
+ response = self.ws.recv(timeout=DEFAULT_TIMEOUT_SECONDS)
164
+ except TimeoutError as ex:
165
+ raise TimeoutError(
166
+ f"WebSocket receive from {self.uri} timed out after {DEFAULT_TIMEOUT_SECONDS} seconds. "
167
+ "The server may not have responded in time."
168
+ ) from ex
163
169
  except (ConnectionClosedOK, ConnectionClosedError) as ex:
164
170
  # Mirror C# behavior: close and raise WebSocketException
165
171
  try:
@@ -6,19 +6,43 @@ from hypertube.utils.connectionData.IConnectionData import IConnectionData
6
6
 
7
7
  class TcpConnectionData(IConnectionData):
8
8
 
9
- def __init__(self, hostname: str, port: int):
9
+ def __init__(self, hostname: str):
10
10
  super().__init__()
11
- self._hostname = f"{hostname}:{port}"
11
+ host_only, port = self.__parse_hostname(hostname)
12
+ self._hostname = f"{host_only}:{port}"
12
13
  self._port = port
13
14
  self._ip_address = ""
14
- if hostname == "localhost":
15
+ if host_only == "localhost":
15
16
  self._ip_address = "127.0.0.1"
16
17
  else:
17
18
  try:
18
- self._ip_address = socket.gethostbyname(hostname)
19
+ self._ip_address = socket.gethostbyname(host_only)
19
20
  except socket.gaierror:
20
21
  self._ip_address = ""
21
22
 
23
+ @staticmethod
24
+ def __parse_hostname(hostname: str):
25
+ value = str(hostname).strip()
26
+ if value.lower().startswith("tcp://"):
27
+ value = value[6:]
28
+ if "/" in value:
29
+ raise ValueError("TCP addresses do not support route paths.")
30
+
31
+ colon = value.rfind(":")
32
+ if colon <= 0 or colon >= len(value) - 1:
33
+ raise ValueError("TCP hostname must use host:port format.")
34
+
35
+ host_only = value[:colon].strip()
36
+ try:
37
+ port = int(value[colon + 1:])
38
+ except Exception:
39
+ raise ValueError("TCP hostname must contain a numeric port.")
40
+
41
+ if not host_only or port < 0 or port > 65535:
42
+ raise ValueError("TCP hostname must contain a non-empty host and port between 0 and 65535.")
43
+
44
+ return host_only, port
45
+
22
46
  @property
23
47
  def connection_type(self):
24
48
  return ConnectionType.Tcp
@@ -5,6 +5,7 @@ require 'websocket'
5
5
 
6
6
  class WebSocketClient
7
7
  MAX_ATTEMPTS = 2
8
+ DEFAULT_TIMEOUT_SECONDS = 60
8
9
 
9
10
  # Cache: URI(string) -> WebSocketClient
10
11
  @clients = {}
@@ -169,7 +170,7 @@ class WebSocketClient
169
170
 
170
171
  # Receive a full message payload as Array<Integer> (bytes)
171
172
  # Raises on CLOSE like the C# code (instead of returning nil).
172
- def receive_bytes(timeout: 5)
173
+ def receive_bytes(timeout: DEFAULT_TIMEOUT_SECONDS)
173
174
  deadline = Time.now + timeout
174
175
  payload_chunks = []
175
176
 
@@ -251,7 +252,7 @@ class WebSocketClient
251
252
  write_all(@handshake.to_s)
252
253
  loop do
253
254
  break if @handshake.finished?
254
- wait_timeout = @connect_timeout && @connect_timeout < 0 ? nil : (@connect_timeout || 5)
255
+ wait_timeout = @connect_timeout && @connect_timeout < 0 ? nil : (@connect_timeout || DEFAULT_TIMEOUT_SECONDS)
255
256
  raise "WebSocket connection to #{@uri}: handshake timeout. The server did not complete the WebSocket upgrade in time." unless IO.select([@socket], nil, nil, wait_timeout)
256
257
 
257
258
  data = @socket.read_nonblock(4096, exception: false)
@@ -3,15 +3,16 @@
3
3
  class TcpConnectionData
4
4
  attr_reader :hostname, :ip_address, :port
5
5
 
6
- def initialize(hostname, port)
7
- @hostname = "#{hostname}:#{port}"
6
+ def initialize(hostname)
7
+ host_only, port = parse_hostname(hostname)
8
+ @hostname = "#{host_only}:#{port}"
8
9
  @port = port
9
10
  @headers = {}
10
- if hostname == 'localhost'
11
+ if host_only == 'localhost'
11
12
  @ip_address = '127.0.0.1'
12
13
  else
13
14
  begin
14
- @ip_address = IPSocket.getaddress(hostname)
15
+ @ip_address = IPSocket.getaddress(host_only)
15
16
  rescue SocketError
16
17
  raise 'Unable to resolve hostname to an IP address.'
17
18
  end
@@ -59,6 +60,25 @@ class TcpConnectionData
59
60
 
60
61
  private
61
62
 
63
+ def parse_hostname(hostname)
64
+ value = hostname.to_s.strip
65
+ value = value[6..-1] if value.downcase.start_with?('tcp://')
66
+ raise 'TCP addresses do not support route paths.' if value.include?('/')
67
+
68
+ colon = value.rindex(':')
69
+ raise 'TCP hostname must use host:port format.' if !colon || colon <= 0 || colon >= value.length - 1
70
+
71
+ host_only = value[0...colon].strip
72
+ port = Integer(value[colon + 1..-1])
73
+ if host_only.empty? || port.negative? || port > 65_535
74
+ raise 'TCP hostname must contain a non-empty host and port between 0 and 65535.'
75
+ end
76
+
77
+ [host_only, port]
78
+ rescue ArgumentError
79
+ raise 'TCP hostname must contain a numeric port.'
80
+ end
81
+
62
82
  def serialize_headers_for_key
63
83
  return '' if headers.nil? || headers.empty?
64
84
 
@@ -1 +1 @@
1
- 3.0.3
1
+ 3.0.4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypertube-binaries",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "Hypertube allows you to reference and use modules or packages written in (Java/Kotlin/Groovy/Clojure, C#/VB.NET, Ruby, Perl, Python, JavaScript/TypeScript) like they were created in your technology. It works on Linux/Windows and MacOS for applications created in JVM, CLR/Netcore, Perl, Python, Ruby, NodeJS, C++ or GoLang and gives you unparalleled freedom and flexibility with native performance in building your mixed-technologies products. Let it be accessing best AI or cryptography libraries, devices SDKs, legacy client modules, internal custom packages or anything from public repositories available on NPM, Nuget, PyPI, Maven/Gradle, RubyGems or GitHub. Get free from programming languages barriers today! For more information check out our guides at https://www.hypertube.dev/guides/v2/",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
@@ -1,2 +0,0 @@
1
- 2026-05-05 13:22:20 Thread ID: 266575848004128 Configuration source is not a valid JSON. Check your configuration:
2
- ./config2.json
@@ -1,2 +0,0 @@
1
- 2026-05-05 13:25:39 Thread ID: 140094835955520 Configuration source is not a valid JSON. Check your configuration:
2
- ./config2.json
@@ -1,2 +0,0 @@
1
- 2026-05-05 15:22:42 Thread ID: 0x1e89410c0 Configuration source is not a valid JSON. Check your configuration:
2
- ./config2.json
@@ -1,2 +0,0 @@
1
- 2026-05-05 13:33:36 Thread ID: 0x7ff852d83840 Configuration source is not a valid JSON. Check your configuration:
2
- ./config2.json
@@ -1,2 +0,0 @@
1
- 2026-05-05 13:28:49 Thread ID: 11276 Configuration source is not a valid JSON. Check your configuration:
2
- ./config2.json
@@ -1,2 +0,0 @@
1
- 2026-05-05 13:27:28 Thread ID: 6032 Configuration source is not a valid JSON. Check your configuration:
2
- ./config2.json