sappho-socket 0.1.3 → 0.1.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.
@@ -12,10 +12,11 @@ module Sappho
12
12
 
13
13
  class SafeServer
14
14
 
15
- def initialize name, port, maxClients = 10, detailedLogging = false
15
+ def initialize name, port, maxClients = 10, timeout = 10, detailedLogging = false
16
16
  @name = name
17
17
  @port = port
18
18
  @maxClients = maxClients
19
+ @timeout = timeout
19
20
  @detailedLogging = detailedLogging
20
21
  @clients = {}
21
22
  @mutex = Mutex.new
@@ -41,7 +42,7 @@ module Sappho
41
42
  log ip, 'connected' if @detailedLogging
42
43
  end
43
44
  Thread.new client, ip do | client, ip |
44
- socket = SafeSocket.new 30
45
+ socket = SafeSocket.new @timeout
45
46
  socket.attach client
46
47
  begin
47
48
  yield socket, ip, @name, @port
@@ -6,7 +6,7 @@
6
6
  module Sappho
7
7
  module Socket
8
8
  NAME = 'sappho-socket'
9
- VERSION = '0.1.3'
9
+ VERSION = '0.1.4'
10
10
  AUTHORS = ['Andrew Heald']
11
11
  EMAILS = ['andrew@heald.co.uk']
12
12
  HOMEPAGE = 'https://github.com/sappho/sappho-socket/wiki'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sappho-socket
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Heald