Skip to content

Commit ef8c4bd

Browse files
committed
initial commit
1 parent f9ecc6c commit ef8c4bd

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package io.reactivesocket.aeron;
2+
3+
/**
4+
* Created by rroeser on 8/13/15.
5+
*/
6+
public class AeronServerDuplexConnection {
7+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package io.reactivesocket.aeron;
2+
3+
import io.reactivesocket.ReactiveSocketServerProtocol;
4+
import io.reactivesocket.RequestHandler;
5+
import uk.co.real_logic.aeron.Aeron;
6+
import uk.co.real_logic.aeron.Image;
7+
8+
/**
9+
* Created by rroeser on 8/13/15.
10+
*/
11+
public class ReactiveSocketAeronServer {
12+
private final ReactiveSocketServerProtocol rsServerProtocol;
13+
14+
private final Aeron aeron;
15+
16+
private final int SERVER_STREAM_ID = 1;
17+
18+
private final int port;
19+
20+
public ReactiveSocketAeronServer(int port, RequestHandler requestHandler) {
21+
this.port = port;
22+
23+
rsServerProtocol = ReactiveSocketServerProtocol.create(requestHandler);
24+
25+
final Aeron.Context ctx = new Aeron.Context();
26+
ctx.newImageHandler(this::newImageHandler);
27+
28+
aeron = Aeron.connect(ctx);
29+
30+
aeron.addSubscription("udp://localhost:" + port, SERVER_STREAM_ID);
31+
}
32+
33+
void newImageHandler(Image image, String channel, int streamId, int sessionId, long joiningPosition, String sourceIdentity) {
34+
if (SERVER_STREAM_ID == streamId) {
35+
36+
} else {
37+
System.out.println("");
38+
}
39+
}
40+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package io.reactivesocket.aeron;
2+
3+
/**
4+
* Created by rroeser on 8/13/15.
5+
*/
6+
public class ReactivesocketAeronClient {
7+
}

0 commit comments

Comments
 (0)