5
|
1 package rep;
|
|
2
|
|
3 import java.io.IOException;
|
|
4 import java.net.InetSocketAddress;
|
|
5 import java.nio.channels.SocketChannel;
|
|
6
|
|
7 import rep.net.REPNet;
|
|
8 import test.TestGUI;
|
|
9
|
|
10 public class ConnectToSessionManager {
|
|
11 private SocketChannel sc;
|
|
12 private REPPacketReceive repreceive;
|
|
13 private REPPacketSend repsend;
|
|
14 private TestGUI gui;
|
|
15 private REPNet rnet;
|
|
16
|
|
17 public static void main(String[] args){
|
|
18 ConnectToSessionManager test = new ConnectToSessionManager();
|
|
19 test.sm_join("localhost");
|
|
20 }
|
|
21
|
|
22 public void sm_join(String host){
|
|
23 rnet = new REPNet();
|
|
24 rnet.sm_connect(host, 8765);
|
|
25 rnet.send(REPCommand.SMCMD_SESSION_JOIN);
|
|
26 }
|
|
27
|
|
28 }
|