net-reactor 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/net/reactor.rb +22 -16
- metadata +2 -2
data/lib/net/reactor.rb
CHANGED
@@ -1,19 +1,25 @@
|
|
1
|
-
# License
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
1
|
+
# == License
|
2
|
+
# GPLv2
|
3
|
+
# == Author
|
4
|
+
# Tassilo Schweyer<welterde@arcor.de>
|
5
|
+
# == Usage
|
6
|
+
# require 'net/reactor'
|
7
|
+
# class Handler
|
8
|
+
# def initialize connection
|
9
|
+
# @connection = connection
|
10
|
+
# ...
|
11
|
+
# end
|
12
|
+
# def readEvent lines
|
13
|
+
# ...
|
14
|
+
# @connection.write lines[0]
|
15
|
+
# ...
|
16
|
+
# end
|
17
|
+
# def disconnected reason
|
18
|
+
# puts reason
|
19
|
+
# end
|
20
|
+
# end
|
21
|
+
# server = Net::Reactor::Server.new(4000, Handler)
|
22
|
+
# server.run
|
17
23
|
|
18
24
|
begin
|
19
25
|
require 'rubygems'
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: net-reactor
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2007-04-
|
6
|
+
version: 0.0.2
|
7
|
+
date: 2007-04-10 00:00:00 +02:00
|
8
8
|
summary: An simple async network-engine for plain text
|
9
9
|
require_paths:
|
10
10
|
- lib
|