relp 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/README.md +3 -3
- data/lib/relp/server.rb +4 -1
- data/lib/relp/version.rb +1 -1
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7f83efde74951f5183dc18758bd7d92de7f0d47
|
4
|
+
data.tar.gz: b582704d3e53d7dce8712d78809e1798680bbebf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbf9e4b9037041a69397d9dd57fe742e2c7af1e76ec062633110f47e393fd8634182026b4e636f2c9a86da86a843e5b470519f3ff83ef21fecbe6df806fc0e71
|
7
|
+
data.tar.gz: 6353f83c40e2cae9ccd5fc6da7660f220dbd9fea6a3ac7746a16fb9ffd90cf3ac45390cc01d63dd525ad4a7483a0ac59abfa62689a2fde632aaa22dce7df3d8c
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
6
|
+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
## [Unreleased]
|
9
|
+
### Added
|
10
|
+
- Started writing this changelog
|
11
|
+
- This repo transferred to ViaQ org
|
12
|
+
|
13
|
+
## [0.1.1] - 2017-06-23
|
14
|
+
### Changed
|
15
|
+
- Version number started to follow Semantic versioning
|
16
|
+
- Renamed server_shut_down to sever_shutdown
|
17
|
+
|
18
|
+
## [0.1] - 2017-06-19
|
19
|
+
### Added
|
20
|
+
- Very first version released as Ruby gem
|
21
|
+
- Basic server-side implementation of RELP protocol, based mainly on
|
22
|
+
reverse-engineering tcp-dums of rsyslog imrelp-omrelp communication.
|
23
|
+
This is, considering state of librelp documentation, basically only
|
24
|
+
reliable way to achieve anything.
|
data/README.md
CHANGED
@@ -50,9 +50,9 @@ and than call method run on instance of server e.g. `server.run`
|
|
50
50
|
|
51
51
|
`callback`
|
52
52
|
* This is a required setting.
|
53
|
-
* Method you want to be executed upon successfully accepted message, it has only one :
|
53
|
+
* Method you want to be executed upon successfully accepted message, it has only one :Hash parameter, which is message itself.
|
54
54
|
|
55
|
-
|
55
|
+
#### Important Methods
|
56
56
|
* `run` Start connceting clients
|
57
57
|
* `server_shutdown` Close connection to all clients and shutdown server
|
58
58
|
|
@@ -68,7 +68,7 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
68
68
|
To install this gem onto your local machine, run `bundle exec rake install`.
|
69
69
|
## Contributing
|
70
70
|
|
71
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
71
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ViaQ/Relp.
|
72
72
|
|
73
73
|
|
74
74
|
## License
|
data/lib/relp/server.rb
CHANGED
@@ -22,7 +22,8 @@ module Relp
|
|
22
22
|
|
23
23
|
def run
|
24
24
|
loop do
|
25
|
-
|
25
|
+
client_socket = @server.accept
|
26
|
+
Thread.start(client_socket) do |client_socket|
|
26
27
|
begin
|
27
28
|
@socket_list.push client_socket
|
28
29
|
remote_ip = client_socket.peeraddr[3]
|
@@ -41,6 +42,8 @@ module Relp
|
|
41
42
|
@logger.info "Connection closed"
|
42
43
|
rescue Relp::RelpProtocolError => err
|
43
44
|
@logger.warn 'Relp error: ' + err.class.to_s + ' ' + err.message
|
45
|
+
rescue Exception => e
|
46
|
+
@logger.debug e
|
44
47
|
ensure
|
45
48
|
server_close_message(client_socket) rescue nil
|
46
49
|
@logger.debug "Closing client socket=#{client_socket.object_id}"
|
data/lib/relp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
+
- Jiří Vymazal
|
7
8
|
- Dominik Hlaváč Ďurán
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2017-
|
12
|
+
date: 2017-08-18 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
@@ -55,11 +56,13 @@ dependencies:
|
|
55
56
|
description: If you want to receive or send message via RELP protocol you can use
|
56
57
|
this gem
|
57
58
|
email:
|
59
|
+
- jvymazal@redhat.com
|
58
60
|
- dhlavacd@redhat.com
|
59
61
|
executables: []
|
60
62
|
extensions: []
|
61
63
|
extra_rdoc_files: []
|
62
64
|
files:
|
65
|
+
- CHANGELOG.md
|
63
66
|
- LICENSE.txt
|
64
67
|
- README.md
|
65
68
|
- Rakefile
|
@@ -73,7 +76,7 @@ files:
|
|
73
76
|
- lib/relp/version.rb
|
74
77
|
- test/RELP_test.rb
|
75
78
|
- test/test_helper.rb
|
76
|
-
homepage: https://github.com/
|
79
|
+
homepage: https://github.com/ViaQ/Relp
|
77
80
|
licenses:
|
78
81
|
- MIT
|
79
82
|
metadata: {}
|
@@ -93,10 +96,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
96
|
version: '0'
|
94
97
|
requirements: []
|
95
98
|
rubyforge_project:
|
96
|
-
rubygems_version: 2.
|
99
|
+
rubygems_version: 2.6.6
|
97
100
|
signing_key:
|
98
101
|
specification_version: 4
|
99
102
|
summary: Ruby implementation of RELP (Reliable Event Logging Protocol) protocol.
|
100
103
|
test_files:
|
101
|
-
- test/RELP_test.rb
|
102
104
|
- test/test_helper.rb
|
105
|
+
- test/RELP_test.rb
|