eventmachine 0.12.2 → 0.12.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +191 -0
- data/{COPYING → docs/COPYING} +0 -0
- data/docs/ChangeLog +183 -0
- data/{DEFERRABLES → docs/DEFERRABLES} +1 -1
- data/{EPOLL → docs/EPOLL} +0 -0
- data/{GNU → docs/GNU} +0 -0
- data/docs/INSTALL +15 -0
- data/{KEYBOARD → docs/KEYBOARD} +0 -0
- data/{LEGAL → docs/LEGAL} +0 -0
- data/{LIGHTWEIGHT_CONCURRENCY → docs/LIGHTWEIGHT_CONCURRENCY} +1 -1
- data/{PURE_RUBY → docs/PURE_RUBY} +1 -1
- data/{README → docs/README} +1 -1
- data/{RELEASE_NOTES → docs/RELEASE_NOTES} +1 -1
- data/{SMTP → docs/SMTP} +1 -1
- data/{SPAWNED_PROCESSES → docs/SPAWNED_PROCESSES} +1 -1
- data/{TODO → docs/TODO} +1 -1
- data/ext/binder.cpp +1 -1
- data/ext/binder.h +1 -1
- data/ext/cmain.cpp +65 -74
- data/ext/cplusplus.cpp +1 -1
- data/ext/ed.cpp +41 -25
- data/ext/ed.h +10 -3
- data/ext/em.cpp +39 -12
- data/ext/em.h +13 -1
- data/ext/emwin.cpp +1 -1
- data/ext/emwin.h +1 -1
- data/ext/epoll.cpp +1 -1
- data/ext/epoll.h +1 -1
- data/ext/eventmachine.h +1 -1
- data/ext/eventmachine_cpp.h +1 -1
- data/ext/extconf.rb +86 -139
- data/ext/fastfilereader/extconf.rb +161 -0
- data/ext/fastfilereader/mapper.cpp +202 -0
- data/ext/fastfilereader/mapper.h +59 -0
- data/ext/fastfilereader/rubymain.cpp +127 -0
- data/ext/files.cpp +1 -1
- data/ext/files.h +1 -1
- data/ext/kb.cpp +1 -1
- data/ext/page.cpp +1 -1
- data/ext/page.h +1 -1
- data/ext/pipe.cpp +14 -7
- data/ext/project.h +1 -1
- data/ext/rubymain.cpp +56 -2
- data/ext/sigs.cpp +1 -1
- data/ext/sigs.h +1 -1
- data/ext/ssl.cpp +1 -1
- data/ext/ssl.h +1 -1
- data/java/src/com/rubyeventmachine/Application.java +196 -0
- data/java/src/com/rubyeventmachine/Connection.java +74 -0
- data/java/src/com/rubyeventmachine/ConnectionFactory.java +37 -0
- data/java/src/com/rubyeventmachine/DefaultConnectionFactory.java +46 -0
- data/java/src/com/rubyeventmachine/EmReactor.java +408 -0
- data/java/src/com/rubyeventmachine/EmReactorException.java +40 -0
- data/java/src/com/rubyeventmachine/EventableChannel.java +57 -0
- data/java/src/com/rubyeventmachine/EventableDatagramChannel.java +171 -0
- data/java/src/com/rubyeventmachine/EventableSocketChannel.java +244 -0
- data/java/src/com/rubyeventmachine/PeriodicTimer.java +38 -0
- data/java/src/com/rubyeventmachine/Timer.java +54 -0
- data/java/src/com/rubyeventmachine/tests/ApplicationTest.java +108 -0
- data/java/src/com/rubyeventmachine/tests/ConnectTest.java +124 -0
- data/java/src/com/rubyeventmachine/tests/EMTest.java +80 -0
- data/java/src/com/rubyeventmachine/tests/TestDatagrams.java +53 -0
- data/java/src/com/rubyeventmachine/tests/TestServers.java +74 -0
- data/java/src/com/rubyeventmachine/tests/TestTimers.java +89 -0
- data/lib/em/deferrable.rb +1 -1
- data/lib/em/eventable.rb +1 -1
- data/lib/em/future.rb +1 -1
- data/lib/em/messages.rb +1 -1
- data/lib/em/processes.rb +1 -1
- data/lib/em/spawnable.rb +1 -1
- data/lib/em/streamer.rb +1 -1
- data/lib/eventmachine.rb +138 -116
- data/lib/eventmachine_version.rb +2 -2
- data/lib/evma.rb +1 -1
- data/lib/evma/callback.rb +1 -1
- data/lib/evma/container.rb +1 -1
- data/lib/evma/factory.rb +1 -1
- data/lib/evma/protocol.rb +1 -1
- data/lib/evma/reactor.rb +1 -1
- data/lib/jeventmachine.rb +7 -2
- data/lib/pr_eventmachine.rb +2 -2
- data/lib/protocols/buftok.rb +1 -1
- data/lib/protocols/header_and_content.rb +1 -1
- data/lib/protocols/httpcli2.rb +16 -6
- data/lib/protocols/httpclient.rb +7 -1
- data/lib/protocols/line_and_text.rb +6 -2
- data/lib/protocols/linetext2.rb +12 -14
- data/lib/protocols/postgres.rb +1 -1
- data/lib/protocols/saslauth.rb +1 -1
- data/lib/protocols/smtpclient.rb +1 -1
- data/lib/protocols/smtpserver.rb +36 -23
- data/lib/protocols/stomp.rb +24 -1
- data/lib/protocols/tcptest.rb +1 -1
- data/tasks/cpp.rake +77 -0
- data/tasks/project.rake +78 -0
- data/tasks/tests.rake +192 -0
- data/tests/test_attach.rb +1 -1
- data/tests/test_basic.rb +65 -12
- data/tests/test_defer.rb +13 -29
- data/tests/test_epoll.rb +16 -21
- data/tests/test_errors.rb +1 -1
- data/tests/test_eventables.rb +4 -5
- data/tests/test_exc.rb +1 -1
- data/tests/test_futures.rb +1 -1
- data/tests/test_hc.rb +185 -236
- data/tests/test_httpclient.rb +1 -1
- data/tests/test_httpclient2.rb +28 -6
- data/tests/test_kb.rb +2 -2
- data/tests/test_ltp.rb +139 -141
- data/tests/test_ltp2.rb +1 -1
- data/tests/test_next_tick.rb +1 -1
- data/tests/test_processes.rb +1 -1
- data/tests/test_pure.rb +3 -2
- data/tests/test_running.rb +1 -1
- data/tests/test_sasl.rb +1 -1
- data/tests/test_send_file.rb +56 -51
- data/tests/test_servers.rb +26 -36
- data/tests/test_smtpclient.rb +46 -44
- data/tests/test_smtpserver.rb +1 -1
- data/tests/test_spawn.rb +1 -1
- data/tests/test_ssl_args.rb +68 -0
- data/tests/test_timers.rb +15 -9
- data/tests/test_ud.rb +1 -1
- data/tests/testem.rb +30 -4
- metadata +69 -34
@@ -0,0 +1,38 @@
|
|
1
|
+
/**
|
2
|
+
* $Id$
|
3
|
+
*
|
4
|
+
* Author:: Francis Cianfrocca (gmail: blackhedd)
|
5
|
+
* Homepage:: http://rubyeventmachine.com
|
6
|
+
* Date:: 15 Jul 2007
|
7
|
+
*
|
8
|
+
* See EventMachine and EventMachine::Connection for documentation and
|
9
|
+
* usage examples.
|
10
|
+
*
|
11
|
+
*
|
12
|
+
*----------------------------------------------------------------------------
|
13
|
+
*
|
14
|
+
* Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
|
15
|
+
* Gmail: blackhedd
|
16
|
+
*
|
17
|
+
* This program is free software; you can redistribute it and/or modify
|
18
|
+
* it under the terms of either: 1) the GNU General Public License
|
19
|
+
* as published by the Free Software Foundation; either version 2 of the
|
20
|
+
* License, or (at your option) any later version; or 2) Ruby's License.
|
21
|
+
*
|
22
|
+
* See the file COPYING for complete licensing information.
|
23
|
+
*
|
24
|
+
*---------------------------------------------------------------------------
|
25
|
+
*
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
|
29
|
+
|
30
|
+
package com.rubyeventmachine;
|
31
|
+
|
32
|
+
public class PeriodicTimer extends Timer {
|
33
|
+
|
34
|
+
public void _fire() {
|
35
|
+
fire();
|
36
|
+
application.addTimer(interval, this);
|
37
|
+
}
|
38
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
/**
|
2
|
+
* $Id$
|
3
|
+
*
|
4
|
+
* Author:: Francis Cianfrocca (gmail: blackhedd)
|
5
|
+
* Homepage:: http://rubyeventmachine.com
|
6
|
+
* Date:: 15 Jul 2007
|
7
|
+
*
|
8
|
+
* See EventMachine and EventMachine::Connection for documentation and
|
9
|
+
* usage examples.
|
10
|
+
*
|
11
|
+
*
|
12
|
+
*----------------------------------------------------------------------------
|
13
|
+
*
|
14
|
+
* Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
|
15
|
+
* Gmail: blackhedd
|
16
|
+
*
|
17
|
+
* This program is free software; you can redistribute it and/or modify
|
18
|
+
* it under the terms of either: 1) the GNU General Public License
|
19
|
+
* as published by the Free Software Foundation; either version 2 of the
|
20
|
+
* License, or (at your option) any later version; or 2) Ruby's License.
|
21
|
+
*
|
22
|
+
* See the file COPYING for complete licensing information.
|
23
|
+
*
|
24
|
+
*---------------------------------------------------------------------------
|
25
|
+
*
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
|
29
|
+
|
30
|
+
package com.rubyeventmachine;
|
31
|
+
|
32
|
+
public class Timer {
|
33
|
+
/**
|
34
|
+
* User code is expected to call a method on a controlling Application,
|
35
|
+
* which will fill in this field so subsequent user code can access it.
|
36
|
+
*/
|
37
|
+
public Application application;
|
38
|
+
public double interval;
|
39
|
+
|
40
|
+
/**
|
41
|
+
* The reactor calls here, and it may be overridden in subclasses.
|
42
|
+
* User code should never call this method.
|
43
|
+
*/
|
44
|
+
public void _fire() {
|
45
|
+
fire();
|
46
|
+
}
|
47
|
+
|
48
|
+
/**
|
49
|
+
* User code is expected to override this method.
|
50
|
+
*/
|
51
|
+
public void fire() {
|
52
|
+
}
|
53
|
+
|
54
|
+
}
|
@@ -0,0 +1,108 @@
|
|
1
|
+
/**
|
2
|
+
* $Id$
|
3
|
+
*
|
4
|
+
* Author:: Francis Cianfrocca (gmail: blackhedd)
|
5
|
+
* Homepage:: http://rubyeventmachine.com
|
6
|
+
* Date:: 15 Jul 2007
|
7
|
+
*
|
8
|
+
* See EventMachine and EventMachine::Connection for documentation and
|
9
|
+
* usage examples.
|
10
|
+
*
|
11
|
+
*
|
12
|
+
*----------------------------------------------------------------------------
|
13
|
+
*
|
14
|
+
* Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
|
15
|
+
* Gmail: blackhedd
|
16
|
+
*
|
17
|
+
* This program is free software; you can redistribute it and/or modify
|
18
|
+
* it under the terms of either: 1) the GNU General Public License
|
19
|
+
* as published by the Free Software Foundation; either version 2 of the
|
20
|
+
* License, or (at your option) any later version; or 2) Ruby's License.
|
21
|
+
*
|
22
|
+
* See the file COPYING for complete licensing information.
|
23
|
+
*
|
24
|
+
*---------------------------------------------------------------------------
|
25
|
+
*
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
package com.rubyeventmachine.tests;
|
32
|
+
|
33
|
+
|
34
|
+
import org.junit.After;
|
35
|
+
import org.junit.AfterClass;
|
36
|
+
import org.junit.Before;
|
37
|
+
import org.junit.BeforeClass;
|
38
|
+
import org.junit.Test;
|
39
|
+
import org.junit.Assert;
|
40
|
+
import java.net.*;
|
41
|
+
import java.io.*;
|
42
|
+
import java.nio.*;
|
43
|
+
|
44
|
+
import com.rubyeventmachine.*;
|
45
|
+
|
46
|
+
public class ApplicationTest {
|
47
|
+
|
48
|
+
@BeforeClass
|
49
|
+
public static void setUpBeforeClass() throws Exception {
|
50
|
+
}
|
51
|
+
|
52
|
+
@AfterClass
|
53
|
+
public static void tearDownAfterClass() throws Exception {
|
54
|
+
}
|
55
|
+
|
56
|
+
@Before
|
57
|
+
public void setUp() throws Exception {
|
58
|
+
}
|
59
|
+
|
60
|
+
@After
|
61
|
+
public void tearDown() throws Exception {
|
62
|
+
}
|
63
|
+
|
64
|
+
@Test
|
65
|
+
public void testRunnableArgument() {
|
66
|
+
final Application a = new Application();
|
67
|
+
a.run (new Runnable() {
|
68
|
+
public void run() {
|
69
|
+
a.stop();
|
70
|
+
}
|
71
|
+
});
|
72
|
+
}
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
class F implements ConnectionFactory {
|
77
|
+
public Connection connection() {
|
78
|
+
return new Connection() {
|
79
|
+
public void receiveData (ByteBuffer bb) {
|
80
|
+
application.stop();
|
81
|
+
}
|
82
|
+
};
|
83
|
+
}
|
84
|
+
|
85
|
+
};
|
86
|
+
|
87
|
+
@Test
|
88
|
+
public void testTcpServer() throws EmReactorException {
|
89
|
+
final Application a = new Application();
|
90
|
+
final SocketAddress saddr = new InetSocketAddress ("127.0.0.1", 9008);
|
91
|
+
a.run (new Runnable() {
|
92
|
+
public void run() {
|
93
|
+
try {
|
94
|
+
a.startServer (saddr, new F());
|
95
|
+
} catch (EmReactorException e) { Assert.fail(); }
|
96
|
+
new Thread() {
|
97
|
+
public void run() {
|
98
|
+
try {
|
99
|
+
Socket s = new Socket ("127.0.0.1", 9008);
|
100
|
+
s.getOutputStream().write(new String ("boo").getBytes());
|
101
|
+
} catch (UnknownHostException e) {
|
102
|
+
} catch (IOException e) {}
|
103
|
+
}
|
104
|
+
}.start();
|
105
|
+
}
|
106
|
+
});
|
107
|
+
}
|
108
|
+
}
|
@@ -0,0 +1,124 @@
|
|
1
|
+
/**
|
2
|
+
* $Id$
|
3
|
+
*
|
4
|
+
* Author:: Francis Cianfrocca (gmail: blackhedd)
|
5
|
+
* Homepage:: http://rubyeventmachine.com
|
6
|
+
* Date:: 15 Jul 2007
|
7
|
+
*
|
8
|
+
* See EventMachine and EventMachine::Connection for documentation and
|
9
|
+
* usage examples.
|
10
|
+
*
|
11
|
+
*
|
12
|
+
*----------------------------------------------------------------------------
|
13
|
+
*
|
14
|
+
* Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
|
15
|
+
* Gmail: blackhedd
|
16
|
+
*
|
17
|
+
* This program is free software; you can redistribute it and/or modify
|
18
|
+
* it under the terms of either: 1) the GNU General Public License
|
19
|
+
* as published by the Free Software Foundation; either version 2 of the
|
20
|
+
* License, or (at your option) any later version; or 2) Ruby's License.
|
21
|
+
*
|
22
|
+
* See the file COPYING for complete licensing information.
|
23
|
+
*
|
24
|
+
*---------------------------------------------------------------------------
|
25
|
+
*
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
|
29
|
+
|
30
|
+
package com.rubyeventmachine.tests;
|
31
|
+
|
32
|
+
|
33
|
+
import org.junit.After;
|
34
|
+
import org.junit.AfterClass;
|
35
|
+
import org.junit.Before;
|
36
|
+
import org.junit.BeforeClass;
|
37
|
+
import org.junit.Test;
|
38
|
+
import java.io.*;
|
39
|
+
import java.nio.*;
|
40
|
+
import java.nio.channels.*;
|
41
|
+
|
42
|
+
import com.rubyeventmachine.*;
|
43
|
+
|
44
|
+
public class ConnectTest {
|
45
|
+
|
46
|
+
@BeforeClass
|
47
|
+
public static void setUpBeforeClass() throws Exception {
|
48
|
+
}
|
49
|
+
|
50
|
+
@AfterClass
|
51
|
+
public static void tearDownAfterClass() throws Exception {
|
52
|
+
}
|
53
|
+
|
54
|
+
@Before
|
55
|
+
public void setUp() throws Exception {
|
56
|
+
}
|
57
|
+
|
58
|
+
@After
|
59
|
+
public void tearDown() throws Exception {
|
60
|
+
}
|
61
|
+
|
62
|
+
@Test
|
63
|
+
public final void test1() throws IOException, ClosedChannelException {
|
64
|
+
Application a = new Application();
|
65
|
+
a.addTimer(0, new Timer() {
|
66
|
+
public void fire() {
|
67
|
+
application.connect("www.bayshorenetworks.com", 80, new Connection() {
|
68
|
+
public void connectionCompleted() {
|
69
|
+
close();
|
70
|
+
}
|
71
|
+
public void unbind() {
|
72
|
+
application.stop();
|
73
|
+
}
|
74
|
+
});
|
75
|
+
}
|
76
|
+
});
|
77
|
+
a.run();
|
78
|
+
}
|
79
|
+
|
80
|
+
@Test
|
81
|
+
public final void test2() throws IOException {
|
82
|
+
class Bays extends Connection {
|
83
|
+
public void connectionCompleted() {
|
84
|
+
sendData (ByteBuffer.wrap( new String ("GET / HTTP/1.1\r\nHost: _\r\n\r\n").getBytes()));
|
85
|
+
}
|
86
|
+
public void receiveData (ByteBuffer b) {
|
87
|
+
System.out.println (new String(b.array()));
|
88
|
+
application.stop();
|
89
|
+
}
|
90
|
+
};
|
91
|
+
|
92
|
+
Application a = new Application();
|
93
|
+
a.addTimer(0, new Timer() {
|
94
|
+
public void fire() {
|
95
|
+
application.connect("www.bayshorenetworks.com", 80, new Bays());
|
96
|
+
}
|
97
|
+
});
|
98
|
+
a.run();
|
99
|
+
}
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
class C1 extends Connection {
|
104
|
+
Application application;
|
105
|
+
public C1 (Application a) {
|
106
|
+
application = a;
|
107
|
+
}
|
108
|
+
public void postInit() {
|
109
|
+
application.stop();
|
110
|
+
}
|
111
|
+
}
|
112
|
+
@Test
|
113
|
+
public final void test3() {
|
114
|
+
final Application a = new Application();
|
115
|
+
a.run (new Runnable() {
|
116
|
+
public void run() {
|
117
|
+
a.connect("www.bayshorenetworks.com", 80, new C1(a));
|
118
|
+
}
|
119
|
+
});
|
120
|
+
}
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
/**
|
2
|
+
* $Id$
|
3
|
+
*
|
4
|
+
* Author:: Francis Cianfrocca (gmail: blackhedd)
|
5
|
+
* Homepage:: http://rubyeventmachine.com
|
6
|
+
* Date:: 15 Jul 2007
|
7
|
+
*
|
8
|
+
* See EventMachine and EventMachine::Connection for documentation and
|
9
|
+
* usage examples.
|
10
|
+
*
|
11
|
+
*
|
12
|
+
*----------------------------------------------------------------------------
|
13
|
+
*
|
14
|
+
* Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
|
15
|
+
* Gmail: blackhedd
|
16
|
+
*
|
17
|
+
* This program is free software; you can redistribute it and/or modify
|
18
|
+
* it under the terms of either: 1) the GNU General Public License
|
19
|
+
* as published by the Free Software Foundation; either version 2 of the
|
20
|
+
* License, or (at your option) any later version; or 2) Ruby's License.
|
21
|
+
*
|
22
|
+
* See the file COPYING for complete licensing information.
|
23
|
+
*
|
24
|
+
*---------------------------------------------------------------------------
|
25
|
+
*
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
|
29
|
+
|
30
|
+
package com.rubyeventmachine.tests;
|
31
|
+
|
32
|
+
//import static org.junit.Assert.*;
|
33
|
+
|
34
|
+
import org.junit.After;
|
35
|
+
import org.junit.AfterClass;
|
36
|
+
import org.junit.Before;
|
37
|
+
import org.junit.BeforeClass;
|
38
|
+
import org.junit.Test;
|
39
|
+
|
40
|
+
import com.rubyeventmachine.EmReactor;
|
41
|
+
|
42
|
+
import java.io.*;
|
43
|
+
import java.nio.*;
|
44
|
+
|
45
|
+
|
46
|
+
public class EMTest {
|
47
|
+
|
48
|
+
class ShortTimer extends EmReactor {
|
49
|
+
public void eventCallback (String sig, int eventCode, ByteBuffer data) {
|
50
|
+
System.out.println ("Short Callback "+sig+" "+eventCode+" "+data);
|
51
|
+
this.stop();
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
@BeforeClass
|
56
|
+
public static void setUpBeforeClass() throws Exception {
|
57
|
+
}
|
58
|
+
|
59
|
+
@AfterClass
|
60
|
+
public static void tearDownAfterClass() throws Exception {
|
61
|
+
}
|
62
|
+
|
63
|
+
@Before
|
64
|
+
public void setUp() throws Exception {
|
65
|
+
}
|
66
|
+
|
67
|
+
@After
|
68
|
+
public void tearDown() throws Exception {
|
69
|
+
}
|
70
|
+
|
71
|
+
|
72
|
+
@Test
|
73
|
+
public final void testOneShort() throws IOException {
|
74
|
+
EmReactor em = new ShortTimer();
|
75
|
+
em.installOneshotTimer(1050);
|
76
|
+
em.run();
|
77
|
+
}
|
78
|
+
|
79
|
+
|
80
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
package com.rubyeventmachine.tests;
|
2
|
+
|
3
|
+
import com.rubyeventmachine.*;
|
4
|
+
import java.net.*;
|
5
|
+
import java.nio.*;
|
6
|
+
|
7
|
+
import org.junit.After;
|
8
|
+
import org.junit.AfterClass;
|
9
|
+
import org.junit.Before;
|
10
|
+
import org.junit.BeforeClass;
|
11
|
+
import org.junit.Test;
|
12
|
+
|
13
|
+
|
14
|
+
public class TestDatagrams {
|
15
|
+
|
16
|
+
@BeforeClass
|
17
|
+
public static void setUpBeforeClass() throws Exception {
|
18
|
+
}
|
19
|
+
|
20
|
+
@AfterClass
|
21
|
+
public static void tearDownAfterClass() throws Exception {
|
22
|
+
}
|
23
|
+
|
24
|
+
@Before
|
25
|
+
public void setUp() throws Exception {
|
26
|
+
}
|
27
|
+
|
28
|
+
@After
|
29
|
+
public void tearDown() throws Exception {
|
30
|
+
}
|
31
|
+
|
32
|
+
class A extends Connection {
|
33
|
+
public void receiveData (ByteBuffer bb) {
|
34
|
+
application.stop();
|
35
|
+
}
|
36
|
+
}
|
37
|
+
class B extends Connection {
|
38
|
+
public void postInit() {
|
39
|
+
this.sendDatagram(ByteBuffer.wrap(new String("ABC").getBytes()), new InetSocketAddress ("127.0.0.1", 9550));
|
40
|
+
}
|
41
|
+
|
42
|
+
}
|
43
|
+
@Test
|
44
|
+
public final void testA() {
|
45
|
+
final Application a = new Application();
|
46
|
+
a.run (new Runnable() {
|
47
|
+
public void run() {
|
48
|
+
a.openDatagramSocket( new InetSocketAddress ("0.0.0.0", 9550), new A() );
|
49
|
+
a.openDatagramSocket( new B() );
|
50
|
+
}
|
51
|
+
});
|
52
|
+
}
|
53
|
+
}
|