eventmachine 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +281 -0
- data/README +69 -0
- data/RELEASE_NOTES +18 -0
- data/doc/classes/Echo.html +180 -0
- data/doc/classes/Echo.src/M000033.html +23 -0
- data/doc/classes/Echo.src/M000034.html +19 -0
- data/doc/classes/Echo.src/M000035.html +19 -0
- data/doc/classes/Echo.src/M000036.html +18 -0
- data/doc/classes/EventMachine.html +369 -0
- data/doc/classes/EventMachine.src/M000002.html +24 -0
- data/doc/classes/EventMachine.src/M000003.html +24 -0
- data/doc/classes/EventMachine.src/M000004.html +26 -0
- data/doc/classes/EventMachine.src/M000005.html +21 -0
- data/doc/classes/EventMachine.src/M000006.html +23 -0
- data/doc/classes/EventMachine.src/M000007.html +28 -0
- data/doc/classes/EventMachine.src/M000008.html +20 -0
- data/doc/classes/EventMachine.src/M000009.html +19 -0
- data/doc/classes/EventMachine.src/M000010.html +18 -0
- data/doc/classes/EventMachine.src/M000011.html +18 -0
- data/doc/classes/EventMachine/Connection.html +341 -0
- data/doc/classes/EventMachine/Connection.src/M000020.html +19 -0
- data/doc/classes/EventMachine/Connection.src/M000021.html +17 -0
- data/doc/classes/EventMachine/Connection.src/M000022.html +18 -0
- data/doc/classes/EventMachine/Connection.src/M000023.html +17 -0
- data/doc/classes/EventMachine/Connection.src/M000024.html +18 -0
- data/doc/classes/EventMachine/Connection.src/M000025.html +18 -0
- data/doc/classes/EventMachine/Connection.src/M000026.html +18 -0
- data/doc/classes/EventMachine/Connection.src/M000027.html +18 -0
- data/doc/classes/EventMachine/Connection.src/M000028.html +17 -0
- data/doc/classes/EventMachine/Connection.src/M000029.html +18 -0
- data/doc/classes/EventMachine/Connection.src/M000030.html +18 -0
- data/doc/classes/EventMachine/Connection.src/M000031.html +18 -0
- data/doc/classes/EventMachine/Connection.src/M000032.html +18 -0
- data/doc/classes/EventMachine/ConnectionAlreadyBound.html +111 -0
- data/doc/classes/EventMachine/ConnectionNotBound.html +111 -0
- data/doc/classes/EventMachine/Connections.html +292 -0
- data/doc/classes/EventMachine/Connections.src/M000012.html +20 -0
- data/doc/classes/EventMachine/Connections.src/M000013.html +23 -0
- data/doc/classes/EventMachine/Connections.src/M000014.html +23 -0
- data/doc/classes/EventMachine/Connections.src/M000015.html +24 -0
- data/doc/classes/EventMachine/Connections.src/M000016.html +19 -0
- data/doc/classes/EventMachine/Connections.src/M000017.html +21 -0
- data/doc/classes/EventMachine/Connections.src/M000018.html +19 -0
- data/doc/classes/EventMachine/Connections.src/M000019.html +20 -0
- data/doc/classes/EventMachine/EventCodes.html +133 -0
- data/doc/classes/EventMachine/NoConnectionMade.html +111 -0
- data/doc/classes/EventMachine/NoHandlerForAcceptedConnection.html +111 -0
- data/doc/classes/EventMachine/NoServerCreated.html +111 -0
- data/doc/classes/EventMachine/TimerNotInstalled.html +111 -0
- data/doc/classes/EventMachine/TooManyAcceptors.html +111 -0
- data/doc/classes/EventMachine/TooManyTimersPending.html +111 -0
- data/doc/classes/EventMachine/UnknownTimerFired.html +111 -0
- data/doc/classes/Zzz.html +131 -0
- data/doc/classes/Zzz.src/M000001.html +18 -0
- data/doc/created.rid +1 -0
- data/doc/files/binder_cpp.html +101 -0
- data/doc/files/ed_cpp.html +101 -0
- data/doc/files/em_cpp.html +101 -0
- data/doc/files/event_machine_rb.html +118 -0
- data/doc/files/g_rb.html +108 -0
- data/doc/files/lib/eventmachine_rb.html +114 -0
- data/doc/files/libmain_cpp.html +101 -0
- data/doc/files/sigs_cpp.html +101 -0
- data/doc/files/tests/testem_rb.html +110 -0
- data/doc/fr_class_index.html +41 -0
- data/doc/fr_file_index.html +35 -0
- data/doc/fr_method_index.html +62 -0
- data/doc/index.html +24 -0
- data/ext/libeventmachine.so +0 -0
- data/lib/eventmachine.rb +631 -0
- data/tests/testem.rb +5 -0
- metadata +121 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>run (EventMachine)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/eventmachine.rb, line 10</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">EventMachine</span><span class="ruby-operator">::</span><span class="ruby-identifier">run</span> <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
15
|
+
<span class="ruby-ivar">@conns</span> = {}
|
16
|
+
<span class="ruby-ivar">@acceptors</span> = {}
|
17
|
+
<span class="ruby-ivar">@timers</span> = {}
|
18
|
+
<span class="ruby-identifier">initialize_event_machine</span>
|
19
|
+
<span class="ruby-identifier">block</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">add_timer</span> <span class="ruby-value">0</span>, <span class="ruby-identifier">block</span>
|
20
|
+
<span class="ruby-identifier">run_machine</span>
|
21
|
+
<span class="ruby-identifier">release_machine</span>
|
22
|
+
<span class="ruby-keyword kw">end</span></pre>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>add_timer (EventMachine)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/eventmachine.rb, line 20</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">EventMachine</span><span class="ruby-operator">::</span><span class="ruby-identifier">add_timer</span> <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
15
|
+
<span class="ruby-identifier">interval</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span>
|
16
|
+
<span class="ruby-identifier">code</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">block</span>
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">code</span>
|
18
|
+
<span class="ruby-comment cmt"># check too many timers!</span>
|
19
|
+
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">add_oneshot_timer</span> <span class="ruby-identifier">interval</span>
|
20
|
+
<span class="ruby-ivar">@timers</span>[<span class="ruby-identifier">s</span>] = <span class="ruby-identifier">code</span>
|
21
|
+
<span class="ruby-keyword kw">end</span>
|
22
|
+
<span class="ruby-keyword kw">end</span></pre>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>add_periodic_timer (EventMachine)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/eventmachine.rb, line 30</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">EventMachine</span><span class="ruby-operator">::</span><span class="ruby-identifier">add_periodic_timer</span> <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
15
|
+
<span class="ruby-identifier">interval</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span>
|
16
|
+
<span class="ruby-identifier">code</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">block</span>
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">code</span>
|
18
|
+
<span class="ruby-identifier">block_1</span> = <span class="ruby-identifier">proc</span> {
|
19
|
+
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">call</span>
|
20
|
+
<span class="ruby-constant">EventMachine</span><span class="ruby-operator">::</span><span class="ruby-identifier">add_periodic_timer</span> <span class="ruby-identifier">interval</span>, <span class="ruby-identifier">code</span>
|
21
|
+
}
|
22
|
+
<span class="ruby-identifier">add_timer</span> <span class="ruby-identifier">interval</span>, <span class="ruby-identifier">block_1</span>
|
23
|
+
<span class="ruby-keyword kw">end</span>
|
24
|
+
<span class="ruby-keyword kw">end</span></pre>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>start_server (EventMachine)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/eventmachine.rb, line 42</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">EventMachine</span><span class="ruby-operator">::</span><span class="ruby-identifier">start_server</span> <span class="ruby-identifier">server</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">handler</span>=<span class="ruby-keyword kw">nil</span>
|
15
|
+
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">start_tcp_server</span> <span class="ruby-identifier">server</span>, <span class="ruby-identifier">port</span>
|
16
|
+
<span class="ruby-ivar">@acceptors</span>[<span class="ruby-identifier">s</span>] = <span class="ruby-constant">Class</span>.<span class="ruby-identifier">new</span>( <span class="ruby-constant">Connection</span> ) {
|
17
|
+
<span class="ruby-identifier">handler</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">include</span> <span class="ruby-identifier">handler</span>
|
18
|
+
}
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>connect (EventMachine)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/eventmachine.rb, line 59</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">EventMachine</span><span class="ruby-operator">::</span><span class="ruby-identifier">connect</span> <span class="ruby-identifier">server</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">handler</span>=<span class="ruby-keyword kw">nil</span>
|
15
|
+
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">connect_server</span> <span class="ruby-identifier">server</span>, <span class="ruby-identifier">port</span>
|
16
|
+
<span class="ruby-identifier">klass</span> = <span class="ruby-constant">Class</span>.<span class="ruby-identifier">new</span>( <span class="ruby-constant">Connection</span> ) {
|
17
|
+
<span class="ruby-identifier">handler</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">include</span> <span class="ruby-identifier">handler</span>
|
18
|
+
}
|
19
|
+
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">s</span>
|
20
|
+
<span class="ruby-ivar">@conns</span>[<span class="ruby-identifier">s</span>] = <span class="ruby-identifier">c</span>
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>connection_callback (EventMachine)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File event_machine.rb, line 47</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connection_callback</span> <span class="ruby-identifier">conn_binding</span>, <span class="ruby-identifier">opcode</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">datasize</span>
|
15
|
+
<span class="ruby-identifier">conn_binding</span> = <span class="ruby-identifier">conn_binding</span>.<span class="ruby-identifier">to_s</span>
|
16
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">opcode</span>
|
17
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">EventCodes</span><span class="ruby-operator">::</span><span class="ruby-constant">TimerFired</span>
|
18
|
+
<span class="ruby-constant">Connections</span><span class="ruby-operator">::</span><span class="ruby-identifier">instance</span>.<span class="ruby-identifier">run_timer</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">datasize</span>)
|
19
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">EventCodes</span><span class="ruby-operator">::</span><span class="ruby-constant">ConnectionUnbound</span>
|
20
|
+
<span class="ruby-constant">Connections</span><span class="ruby-operator">::</span><span class="ruby-identifier">instance</span>.<span class="ruby-identifier">unbind_connection</span> <span class="ruby-identifier">conn_binding</span>
|
21
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">EventCodes</span><span class="ruby-operator">::</span><span class="ruby-constant">ConnectionData</span>
|
22
|
+
<span class="ruby-constant">Connections</span><span class="ruby-operator">::</span><span class="ruby-identifier">instance</span>.<span class="ruby-identifier">receive_data</span> <span class="ruby-identifier">conn_binding</span>, <span class="ruby-identifier">data</span>.<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">datasize</span>)
|
23
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">EventCodes</span><span class="ruby-operator">::</span><span class="ruby-constant">ConnectionAccepted</span>
|
24
|
+
<span class="ruby-constant">Connections</span><span class="ruby-operator">::</span><span class="ruby-identifier">instance</span>.<span class="ruby-identifier">accept_connection</span> <span class="ruby-identifier">conn_binding</span>, <span class="ruby-identifier">data</span>.<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">datasize</span>)
|
25
|
+
<span class="ruby-keyword kw">end</span>
|
26
|
+
<span class="ruby-keyword kw">end</span></pre>
|
27
|
+
</body>
|
28
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>add_timer (EventMachine)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File event_machine.rb, line 70</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">EventMachine</span><span class="ruby-operator">::</span><span class="ruby-identifier">add_timer</span> <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
15
|
+
<span class="ruby-identifier">interval</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span>
|
16
|
+
<span class="ruby-identifier">code</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">block</span>
|
17
|
+
<span class="ruby-identifier">code</span> <span class="ruby-keyword kw">and</span> <span class="ruby-constant">Connections</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">add_timer</span> <span class="ruby-identifier">interval</span>, <span class="ruby-identifier">code</span>
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>run (EventMachine)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File event_machine.rb, line 81</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">EventMachine</span><span class="ruby-operator">::</span><span class="ruby-identifier">run</span> <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
15
|
+
<span class="ruby-identifier">block</span> <span class="ruby-keyword kw">and</span> <span class="ruby-constant">EventMachine</span><span class="ruby-operator">::</span><span class="ruby-identifier">add_timer</span> <span class="ruby-value">0</span>, <span class="ruby-identifier">block</span>
|
16
|
+
<span class="ruby-constant">RunMachine</span>.<span class="ruby-identifier">call</span>
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>connect (EventMachine)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File event_machine.rb, line 90</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">EventMachine</span><span class="ruby-operator">::</span><span class="ruby-identifier">connect</span> <span class="ruby-identifier">server</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">handler</span>=<span class="ruby-keyword kw">nil</span>
|
15
|
+
<span class="ruby-constant">Connections</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">connect</span> <span class="ruby-identifier">server</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">handler</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>start_server (EventMachine)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File event_machine.rb, line 97</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">EventMachine</span><span class="ruby-operator">::</span><span class="ruby-identifier">start_server</span> <span class="ruby-identifier">server</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">handler</span>=<span class="ruby-keyword kw">nil</span>
|
15
|
+
<span class="ruby-constant">Connections</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">start_server</span> <span class="ruby-identifier">server</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">handler</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,341 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: EventMachine::Connection</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">EventMachine::Connection</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/eventmachine_rb.html">
|
59
|
+
lib/eventmachine.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
<a href="../../files/event_machine_rb.html">
|
63
|
+
event_machine.rb
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
</td>
|
67
|
+
</tr>
|
68
|
+
|
69
|
+
<tr class="top-aligned-row">
|
70
|
+
<td><strong>Parent:</strong></td>
|
71
|
+
<td>
|
72
|
+
Object
|
73
|
+
</td>
|
74
|
+
</tr>
|
75
|
+
</table>
|
76
|
+
</div>
|
77
|
+
<!-- banner header -->
|
78
|
+
|
79
|
+
<div id="bodyContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
<div id="contextContent">
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
<div id="method-list">
|
90
|
+
<h3 class="section-bar">Methods</h3>
|
91
|
+
|
92
|
+
<div class="name-list">
|
93
|
+
<a href="#M000024">close_connection</a>
|
94
|
+
<a href="#M000031">close_connection</a>
|
95
|
+
<a href="#M000025">close_connection_after_writing</a>
|
96
|
+
<a href="#M000032">close_connection_after_writing</a>
|
97
|
+
<a href="#M000027">new</a>
|
98
|
+
<a href="#M000020">new</a>
|
99
|
+
<a href="#M000021">post_init</a>
|
100
|
+
<a href="#M000022">receive_data</a>
|
101
|
+
<a href="#M000030">receive_data</a>
|
102
|
+
<a href="#M000026">send_data</a>
|
103
|
+
<a href="#M000029">send_data</a>
|
104
|
+
<a href="#M000028">unbind</a>
|
105
|
+
<a href="#M000023">unbind</a>
|
106
|
+
</div>
|
107
|
+
</div>
|
108
|
+
|
109
|
+
</div>
|
110
|
+
|
111
|
+
|
112
|
+
<!-- if includes -->
|
113
|
+
|
114
|
+
<div id="section">
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<!-- if method_list -->
|
124
|
+
<div id="methods">
|
125
|
+
<h3 class="section-bar">Public Class methods</h3>
|
126
|
+
|
127
|
+
<div id="method-M000027" class="method-detail">
|
128
|
+
<a name="M000027"></a>
|
129
|
+
|
130
|
+
<div class="method-heading">
|
131
|
+
<a href="Connection.src/M000027.html" target="Code" class="method-signature"
|
132
|
+
onclick="popupCode('Connection.src/M000027.html');return false;">
|
133
|
+
<span class="method-name">new</span><span class="method-args">(sig)</span>
|
134
|
+
</a>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<div class="method-description">
|
138
|
+
<p>
|
139
|
+
initialize
|
140
|
+
</p>
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
|
144
|
+
<div id="method-M000020" class="method-detail">
|
145
|
+
<a name="M000020"></a>
|
146
|
+
|
147
|
+
<div class="method-heading">
|
148
|
+
<a href="Connection.src/M000020.html" target="Code" class="method-signature"
|
149
|
+
onclick="popupCode('Connection.src/M000020.html');return false;">
|
150
|
+
<span class="method-name">new</span><span class="method-args">(sig)</span>
|
151
|
+
</a>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
<div class="method-description">
|
155
|
+
</div>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
159
|
+
|
160
|
+
<div id="method-M000024" class="method-detail">
|
161
|
+
<a name="M000024"></a>
|
162
|
+
|
163
|
+
<div class="method-heading">
|
164
|
+
<a href="Connection.src/M000024.html" target="Code" class="method-signature"
|
165
|
+
onclick="popupCode('Connection.src/M000024.html');return false;">
|
166
|
+
<span class="method-name">close_connection</span><span class="method-args">(after_writing = false)</span>
|
167
|
+
</a>
|
168
|
+
</div>
|
169
|
+
|
170
|
+
<div class="method-description">
|
171
|
+
</div>
|
172
|
+
</div>
|
173
|
+
|
174
|
+
<div id="method-M000031" class="method-detail">
|
175
|
+
<a name="M000031"></a>
|
176
|
+
|
177
|
+
<div class="method-heading">
|
178
|
+
<a href="Connection.src/M000031.html" target="Code" class="method-signature"
|
179
|
+
onclick="popupCode('Connection.src/M000031.html');return false;">
|
180
|
+
<span class="method-name">close_connection</span><span class="method-args">(after_write = false)</span>
|
181
|
+
</a>
|
182
|
+
</div>
|
183
|
+
|
184
|
+
<div class="method-description">
|
185
|
+
<p>
|
186
|
+
<a href="Connection.html#M000024">close_connection</a>
|
187
|
+
</p>
|
188
|
+
</div>
|
189
|
+
</div>
|
190
|
+
|
191
|
+
<div id="method-M000025" class="method-detail">
|
192
|
+
<a name="M000025"></a>
|
193
|
+
|
194
|
+
<div class="method-heading">
|
195
|
+
<a href="Connection.src/M000025.html" target="Code" class="method-signature"
|
196
|
+
onclick="popupCode('Connection.src/M000025.html');return false;">
|
197
|
+
<span class="method-name">close_connection_after_writing</span><span class="method-args">()</span>
|
198
|
+
</a>
|
199
|
+
</div>
|
200
|
+
|
201
|
+
<div class="method-description">
|
202
|
+
</div>
|
203
|
+
</div>
|
204
|
+
|
205
|
+
<div id="method-M000032" class="method-detail">
|
206
|
+
<a name="M000032"></a>
|
207
|
+
|
208
|
+
<div class="method-heading">
|
209
|
+
<a href="Connection.src/M000032.html" target="Code" class="method-signature"
|
210
|
+
onclick="popupCode('Connection.src/M000032.html');return false;">
|
211
|
+
<span class="method-name">close_connection_after_writing</span><span class="method-args">()</span>
|
212
|
+
</a>
|
213
|
+
</div>
|
214
|
+
|
215
|
+
<div class="method-description">
|
216
|
+
<p>
|
217
|
+
<a href="Connection.html#M000025">close_connection_after_writing</a>
|
218
|
+
</p>
|
219
|
+
</div>
|
220
|
+
</div>
|
221
|
+
|
222
|
+
<div id="method-M000021" class="method-detail">
|
223
|
+
<a name="M000021"></a>
|
224
|
+
|
225
|
+
<div class="method-heading">
|
226
|
+
<a href="Connection.src/M000021.html" target="Code" class="method-signature"
|
227
|
+
onclick="popupCode('Connection.src/M000021.html');return false;">
|
228
|
+
<span class="method-name">post_init</span><span class="method-args">()</span>
|
229
|
+
</a>
|
230
|
+
</div>
|
231
|
+
|
232
|
+
<div class="method-description">
|
233
|
+
</div>
|
234
|
+
</div>
|
235
|
+
|
236
|
+
<div id="method-M000022" class="method-detail">
|
237
|
+
<a name="M000022"></a>
|
238
|
+
|
239
|
+
<div class="method-heading">
|
240
|
+
<a href="Connection.src/M000022.html" target="Code" class="method-signature"
|
241
|
+
onclick="popupCode('Connection.src/M000022.html');return false;">
|
242
|
+
<span class="method-name">receive_data</span><span class="method-args">(data)</span>
|
243
|
+
</a>
|
244
|
+
</div>
|
245
|
+
|
246
|
+
<div class="method-description">
|
247
|
+
</div>
|
248
|
+
</div>
|
249
|
+
|
250
|
+
<div id="method-M000030" class="method-detail">
|
251
|
+
<a name="M000030"></a>
|
252
|
+
|
253
|
+
<div class="method-heading">
|
254
|
+
<a href="Connection.src/M000030.html" target="Code" class="method-signature"
|
255
|
+
onclick="popupCode('Connection.src/M000030.html');return false;">
|
256
|
+
<span class="method-name">receive_data</span><span class="method-args">(data)</span>
|
257
|
+
</a>
|
258
|
+
</div>
|
259
|
+
|
260
|
+
<div class="method-description">
|
261
|
+
<p>
|
262
|
+
<a href="Connection.html#M000022">receive_data</a>
|
263
|
+
</p>
|
264
|
+
</div>
|
265
|
+
</div>
|
266
|
+
|
267
|
+
<div id="method-M000026" class="method-detail">
|
268
|
+
<a name="M000026"></a>
|
269
|
+
|
270
|
+
<div class="method-heading">
|
271
|
+
<a href="Connection.src/M000026.html" target="Code" class="method-signature"
|
272
|
+
onclick="popupCode('Connection.src/M000026.html');return false;">
|
273
|
+
<span class="method-name">send_data</span><span class="method-args">(data)</span>
|
274
|
+
</a>
|
275
|
+
</div>
|
276
|
+
|
277
|
+
<div class="method-description">
|
278
|
+
</div>
|
279
|
+
</div>
|
280
|
+
|
281
|
+
<div id="method-M000029" class="method-detail">
|
282
|
+
<a name="M000029"></a>
|
283
|
+
|
284
|
+
<div class="method-heading">
|
285
|
+
<a href="Connection.src/M000029.html" target="Code" class="method-signature"
|
286
|
+
onclick="popupCode('Connection.src/M000029.html');return false;">
|
287
|
+
<span class="method-name">send_data</span><span class="method-args">(data)</span>
|
288
|
+
</a>
|
289
|
+
</div>
|
290
|
+
|
291
|
+
<div class="method-description">
|
292
|
+
<p>
|
293
|
+
<a href="Connection.html#M000026">send_data</a>
|
294
|
+
</p>
|
295
|
+
</div>
|
296
|
+
</div>
|
297
|
+
|
298
|
+
<div id="method-M000028" class="method-detail">
|
299
|
+
<a name="M000028"></a>
|
300
|
+
|
301
|
+
<div class="method-heading">
|
302
|
+
<a href="Connection.src/M000028.html" target="Code" class="method-signature"
|
303
|
+
onclick="popupCode('Connection.src/M000028.html');return false;">
|
304
|
+
<span class="method-name">unbind</span><span class="method-args">()</span>
|
305
|
+
</a>
|
306
|
+
</div>
|
307
|
+
|
308
|
+
<div class="method-description">
|
309
|
+
<p>
|
310
|
+
unbind
|
311
|
+
</p>
|
312
|
+
</div>
|
313
|
+
</div>
|
314
|
+
|
315
|
+
<div id="method-M000023" class="method-detail">
|
316
|
+
<a name="M000023"></a>
|
317
|
+
|
318
|
+
<div class="method-heading">
|
319
|
+
<a href="Connection.src/M000023.html" target="Code" class="method-signature"
|
320
|
+
onclick="popupCode('Connection.src/M000023.html');return false;">
|
321
|
+
<span class="method-name">unbind</span><span class="method-args">()</span>
|
322
|
+
</a>
|
323
|
+
</div>
|
324
|
+
|
325
|
+
<div class="method-description">
|
326
|
+
</div>
|
327
|
+
</div>
|
328
|
+
|
329
|
+
|
330
|
+
</div>
|
331
|
+
|
332
|
+
|
333
|
+
</div>
|
334
|
+
|
335
|
+
|
336
|
+
<div id="validator-badges">
|
337
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
338
|
+
</div>
|
339
|
+
|
340
|
+
</body>
|
341
|
+
</html>
|