rubtella 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -26,7 +26,7 @@ class RubtellaLogger
26
26
  def info(message)
27
27
  begin
28
28
  @rubylogger.info message
29
- @growl.notify "rubtella log", "Rubtella", message
29
+ #@growl.notify "rubtella log", "Rubtella", message
30
30
  rescue
31
31
  puts 'logger error'
32
32
  end
@@ -92,13 +92,16 @@ module Rubtella
92
92
  timeout(5) do
93
93
  stream = TCPSocket.new @peer.ip, @peer.port
94
94
  stream.send handshake_req, 0
95
+ @@logger.info handshake_req
95
96
  end
96
97
  @response = stream.recv 1000
97
98
 
98
99
  resp = HTTPData::Parser.new @response
99
- stream.send handshake_resp, 0
100
+ @@logger.info @response
100
101
 
101
102
  if resp.ok?
103
+ stream.send handshake_resp, 0
104
+ @@logger.info handshake_resp
102
105
  #connection established
103
106
  @@logger.info 'connection established'
104
107
  @connected = @peer
@@ -132,7 +135,8 @@ module Rubtella
132
135
  def manage_connection stream
133
136
  loop do
134
137
  @@logger.info 'we\'re listening..'
135
- resp = stream.recv 1000
138
+ resp = stream.recv 10000
139
+ @@logger.info resp
136
140
  if parse(resp) == "ping"
137
141
  pong = TCPData::Builder::Pong.new
138
142
  stream.send pong.build , 0
@@ -51,6 +51,7 @@ module Rubtella
51
51
 
52
52
  build_message
53
53
 
54
+ @payload_length = @payload.length
54
55
  @data = [@guid, @payload_type, @ttl, @hops, @payload_length, @payload]
55
56
 
56
57
  @binary_data = @data.flatten.pack("C*")
data/rubtella.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rubtella}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mateusz Zawisza"]
12
- s.date = %q{2010-01-19}
12
+ s.date = %q{2010-01-28}
13
13
  s.default_executable = %q{rubtella}
14
14
  s.description = %q{Library for Gnuttale in Ruby}
15
15
  s.email = %q{mateusz.zawisza@gmail.com}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubtella
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mateusz Zawisza
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-19 00:00:00 +01:00
12
+ date: 2010-01-28 00:00:00 +01:00
13
13
  default_executable: rubtella
14
14
  dependencies: []
15
15