ExistRuby 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ExistRuby/ExistMessage_pb.rb +42 -0
- data/lib/ExistRuby.rb +3 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecefa0b851288687e069f5a7636cdf2a937590d7
|
4
|
+
data.tar.gz: c893cbb2b58ebfe06a7f467c799d099fedebb90a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9e6e1802b89f26419869fcdccac7af8ff2cfffd501c9de524f42a7589f50c106d14934ad75344215a40ee73659fbc66e98e1700bc5be35d1659407383298439
|
7
|
+
data.tar.gz: 1ee46b6f46a54301061afaeef3c3d4fb786f6778225e09fbd845384a88860ac2eb7a21dd27bb92fce0630cbe6bb077525e9d835ca7eac62639a5fd76000bc1ea
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: ExistMessage.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_message "com.stupidbeauty.exist.ServicePublishMessage" do
|
8
|
+
optional :name, :string, 1
|
9
|
+
optional :port, :int32, 2
|
10
|
+
optional :protocolType, :enum, 3, "com.stupidbeauty.exist.ServicePublishMessage.ServiceProtocolType"
|
11
|
+
end
|
12
|
+
add_enum "com.stupidbeauty.exist.ServicePublishMessage.ServiceProtocolType" do
|
13
|
+
value :HTTP, 0
|
14
|
+
value :UDP, 1
|
15
|
+
value :MQTT, 2
|
16
|
+
value :TCP, 3
|
17
|
+
end
|
18
|
+
add_message "com.stupidbeauty.exist.ServiceProbeMessage" do
|
19
|
+
optional :port, :int32, 1
|
20
|
+
end
|
21
|
+
add_message "com.stupidbeauty.exist.ExistMessage" do
|
22
|
+
optional :messageType, :enum, 1, "com.stupidbeauty.exist.ExistMessage.MessageType"
|
23
|
+
optional :servicePublishMessage, :message, 2, "com.stupidbeauty.exist.ServicePublishMessage"
|
24
|
+
optional :serviceProbeMessage, :message, 3, "com.stupidbeauty.exist.ServiceProbeMessage"
|
25
|
+
end
|
26
|
+
add_enum "com.stupidbeauty.exist.ExistMessage.MessageType" do
|
27
|
+
value :SERVICEPUBLISH, 0
|
28
|
+
value :SERVICEPROBE, 1
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
module Com
|
33
|
+
module Stupidbeauty
|
34
|
+
module Exist
|
35
|
+
ServicePublishMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("com.stupidbeauty.exist.ServicePublishMessage").msgclass
|
36
|
+
ServicePublishMessage::ServiceProtocolType = Google::Protobuf::DescriptorPool.generated_pool.lookup("com.stupidbeauty.exist.ServicePublishMessage.ServiceProtocolType").enummodule
|
37
|
+
ServiceProbeMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("com.stupidbeauty.exist.ServiceProbeMessage").msgclass
|
38
|
+
ExistMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("com.stupidbeauty.exist.ExistMessage").msgclass
|
39
|
+
ExistMessage::MessageType = Google::Protobuf::DescriptorPool.generated_pool.lookup("com.stupidbeauty.exist.ExistMessage.MessageType").enummodule
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
data/lib/ExistRuby.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'ExistRuby/ExistMessage_pb'
|
4
|
+
|
3
5
|
class ExistRuby
|
4
6
|
|
5
7
|
# Publish a service to the LAN.
|
@@ -17,7 +19,7 @@ class ExistRuby
|
|
17
19
|
@lanServicePort=lanServicePort
|
18
20
|
@lanServiceProtocolType=lanServiceProtocolType
|
19
21
|
|
20
|
-
|
22
|
+
Com::Stupidbeauty::Exist::ExistMessage existMessage; //消息。
|
21
23
|
|
22
24
|
existMessage.set_messagetype (exist::ExistMessage::SERVICEPUBLISH); //设置消息类型。
|
23
25
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ExistRuby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hxcan Cai
|
@@ -17,6 +17,7 @@ extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
19
|
- lib/ExistRuby.rb
|
20
|
+
- lib/ExistRuby/ExistMessage_pb.rb
|
20
21
|
homepage: http://rubygems.org/gems/ExistRuby
|
21
22
|
licenses:
|
22
23
|
- MIT
|