cztop 0.11.1 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/lib/cztop/version.rb +1 -1
- data/lib/cztop/zsock_options.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '099d1517d316101f3f2c431c593e42bc34d3966e'
|
4
|
+
data.tar.gz: 96dec497b84793fe275db9c375dff270168028f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c8ad8f41d8c809a4f0292eddc3712c474b0c0ecac6b18de95a5859c5be0553912963848db0710fa75b62c3cd3a53a7d4f5707e7bd3948f19494ceeae4e18598
|
7
|
+
data.tar.gz: '033068a505754652237616df301ab282d3f007a6f644e2b72f0b957fb089371048b3f924d415689af57a02b30191698ccd9acda8bc9c759b0b50cd84dc633999'
|
data/CHANGES.md
CHANGED
data/lib/cztop/version.rb
CHANGED
data/lib/cztop/zsock_options.rb
CHANGED
@@ -231,7 +231,13 @@ module CZTop
|
|
231
231
|
# @return [String] current socket identity
|
232
232
|
def identity() Zsock.identity(@zocket).read_string end
|
233
233
|
# @param identity [String] new socket identity
|
234
|
-
|
234
|
+
# @raise [ArgumentError] if identity is invalid
|
235
|
+
def identity=(identity)
|
236
|
+
raise ArgumentError, "zero-length identity" if identity.bytesize.zero?
|
237
|
+
raise ArgumentError, "identity too long" if identity.bytesize > 255
|
238
|
+
raise ArgumentError, "invalid identity" if identity.start_with? "\0"
|
239
|
+
Zsock.set_identity(@zocket, identity)
|
240
|
+
end
|
235
241
|
|
236
242
|
# @return [Integer] current value of Type of Service
|
237
243
|
def tos() Zsock.tos(@zocket) end
|