├── .classpath
├── .project
├── .settings
├── org.eclipse.core.resources.prefs
├── org.eclipse.jdt.core.prefs
└── org.eclipse.m2e.core.prefs
├── README.md
├── pom.xml
├── src
├── main
│ └── java
│ │ └── com
│ │ └── goim
│ │ └── bootstrap
│ │ ├── AbstractBlockingClient.java
│ │ ├── BruteForceCoding.java
│ │ └── PushClient.java
└── test
│ └── java
│ └── goim
│ └── goim_sdk
│ └── AppTest.java
└── target
├── classes
├── META-INF
│ ├── MANIFEST.MF
│ └── maven
│ │ └── goim
│ │ └── goim-sdk
│ │ ├── pom.properties
│ │ └── pom.xml
└── com
│ └── goim
│ └── bootstrap
│ ├── AbstractBlockingClient$HeartbeatTask.class
│ ├── AbstractBlockingClient$State.class
│ ├── AbstractBlockingClient.class
│ ├── BruteForceCoding.class
│ ├── PushClient$Listener.class
│ └── PushClient.class
└── test-classes
└── goim
└── goim_sdk
└── AppTest.class
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | goim-sdk
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.m2e.core.maven2Builder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.m2e.core.maven2Nature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding//src/main/java=UTF-8
3 | encoding//src/test/java=UTF-8
4 | encoding/=UTF-8
5 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6 | org.eclipse.jdt.core.compiler.compliance=1.8
7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
13 | org.eclipse.jdt.core.compiler.source=1.8
14 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.m2e.core.prefs:
--------------------------------------------------------------------------------
1 | activeProfiles=
2 | eclipse.preferences.version=1
3 | resolveWorkspaceProjects=true
4 | version=1
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # goim-sdk
2 |
3 | 1、此sdk在原来的goim基础上做了修改,auth时候不会自动分配room=0
4 | 会根据
5 | PushClient cb = new PushClient(InetAddress.getByName("10.160.61.129"), 8080 , 1, "game");
6 | 中的game各个字母的asics生成roomId
7 |
8 | 具体goim的修改内容,联系 微信:Alandy59
9 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | jar
5 | goim
6 | goim-sdk
7 | 0.0.1-SNAPSHOT
8 | goim-sdk
9 | http://maven.apache.org
10 |
11 |
12 | UTF-8
13 |
14 |
15 |
16 |
17 | junit
18 | junit
19 | 3.8.1
20 | test
21 |
22 |
23 |
24 |
25 | goim-sdk
26 |
27 |
28 | org.apache.maven.plugins
29 | maven-compiler-plugin
30 | 3.1
31 |
32 | 1.8
33 | 1.8
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/src/main/java/com/goim/bootstrap/AbstractBlockingClient.java:
--------------------------------------------------------------------------------
1 | package com.goim.bootstrap;
2 |
3 | import java.io.DataInputStream;
4 | import java.io.DataOutputStream;
5 | import java.io.IOException;
6 | import java.net.InetAddress;
7 | import java.net.Socket;
8 | import java.util.Observable;
9 | import java.util.concurrent.atomic.AtomicReference;
10 |
11 | /**
12 | * An abstract blocking client, designed to connect to implementations of
13 | * AbstractServer in its own thread. Since the client only has a single
14 | * connection to a single server it can use blocking IO. This class provides a
15 | * set of callback methods for concrete implementations to know the state of the
16 | * client and its connection This client does not log, implementations should
17 | * handle this.
18 | *
19 | * This client does not support SSL or UDP connections.
20 | *
21 | */
22 | public abstract class AbstractBlockingClient extends Observable implements Runnable {
23 |
24 | private enum State {
25 | STOPPED, STOPPING, RUNNING
26 | }
27 |
28 | private static short DEFAULT_MESSAGE_SIZE = 1024;
29 |
30 | private final AtomicReference state = new AtomicReference(State.STOPPED);
31 | protected final InetAddress server;
32 | protected final int port;
33 | private final int defaultBufferSize;
34 | private int defaultHeartBeatTimeOut = 20000;
35 | private int defaultSocketTimeOut = 3 * 60 * 1000;
36 | protected final Integer uid;
37 | protected final String game;
38 | private final AtomicReference out = new AtomicReference();
39 | private final AtomicReference in = new AtomicReference();
40 |
41 | /**
42 | * Construct an unstarted client which will attempt to connect to the given
43 | * server on the given port.
44 | *
45 | * @param server
46 | * the server address.
47 | * @param port
48 | * the port on which to connect to the server.
49 | */
50 | public AbstractBlockingClient(InetAddress server, int port, Integer uid, String game) {
51 | this(server, port, uid, game, DEFAULT_MESSAGE_SIZE);
52 | }
53 |
54 | /**
55 | * Construct an unstarted client which will attempt to connect to the given
56 | * server on the given port.
57 | *
58 | * @param server
59 | * the server address.
60 | * @param port
61 | * the port on which to connect to the server.
62 | * @param defaultBufferSize
63 | * the default buffer size for reads. This should as small as
64 | * possible value that doesn't get exceeded often - see class
65 | * documentation.
66 | */
67 | public AbstractBlockingClient(InetAddress server, int port, Integer uid, String game, int defaultBufferSize) {
68 | this.server = server;
69 | this.port = port;
70 | this.uid = uid;
71 | this.game = game;
72 | this.defaultBufferSize = defaultBufferSize;
73 | }
74 |
75 | /**
76 | * Returns the port to which this client will connect.
77 | *
78 | * @return the port to which this client will connect.
79 | */
80 | public int getPort() {
81 | return port;
82 | }
83 |
84 | /**
85 | * Returns the host to which this client will connect.
86 | *
87 | * @return the host to which this client will connect.
88 | */
89 | public InetAddress getServer() {
90 | return server;
91 | }
92 |
93 | /**
94 | * Returns true if this client is the running state (either connected or
95 | * trying to connect).
96 | *
97 | * @return true if this client is the running state (either connected or
98 | * trying to connect).
99 | */
100 | public boolean isRunning() {
101 | return state.get() == State.RUNNING;
102 | }
103 |
104 | /**
105 | * Returns true if this client is the stopped state.
106 | *
107 | * @return true if this client is the stopped state.
108 | */
109 | public boolean isStopped() {
110 | return state.get() == State.STOPPED;
111 | }
112 |
113 | /**
114 | * Attempt to connect to the server and receive messages. If the client is
115 | * already running, it will not be started again. This method is designed to
116 | * be called in its own thread and will not return until the client is
117 | * stopped.
118 | *
119 | * @throws RuntimeException
120 | * if the client fails
121 | */
122 | public void run() {
123 | Socket socket = null;
124 | try {
125 | socket = new Socket(server, port);
126 | socket.setSoTimeout(defaultSocketTimeOut);
127 |
128 | out.set(new DataOutputStream(socket.getOutputStream()));
129 | in.set(new DataInputStream(socket.getInputStream()));
130 |
131 | if (!state.compareAndSet(State.STOPPED, State.RUNNING)) {
132 | return;
133 | }
134 |
135 | authWrite();
136 |
137 | while (state.get() == State.RUNNING) {
138 |
139 | byte[] inBuffer = new byte[defaultBufferSize];
140 | int readPoint = in.get().read(inBuffer);
141 | if (readPoint != -1) {
142 | byte[] result = BruteForceCoding.tail(inBuffer, inBuffer.length - 16);
143 |
144 | Long operation = BruteForceCoding.decodeIntBigEndian(inBuffer, 8, 4);
145 | if (3 == operation) {
146 | heartBeatReceived();
147 | } else if (8 == operation) {
148 | authSuccess();
149 | heartBeat();
150 | } else if (5 == operation) {
151 | Long packageLength = BruteForceCoding.decodeIntBigEndian(inBuffer, 0, 4);
152 | Long headLength = BruteForceCoding.decodeIntBigEndian(inBuffer, 4, 2);
153 | Long version = BruteForceCoding.decodeIntBigEndian(inBuffer, 6, 2);
154 | Long sequenceId = BruteForceCoding.decodeIntBigEndian(inBuffer, 12, 4);
155 | //messageReceived(packageLength, headLength, version,operation, sequenceId,new String(result).trim());
156 | messageReceived(new String(result).trim());
157 | }
158 | }
159 | }
160 | } catch (Exception ioe) {
161 | System.out.println("Client failure: " + ioe.getMessage());
162 | try {
163 | socket.close();
164 | state.set(State.STOPPED);
165 | disconnected();
166 | } catch (Exception e) {
167 | // do nothing - server failed
168 | }
169 | restart();
170 | }
171 | }
172 |
173 | private void restart(){
174 | if (true){
175 | super.setChanged();
176 | }
177 | notifyObservers();
178 | }
179 |
180 | /**
181 | * Stop the client in a graceful manner. After this call the client may
182 | * spend some time in the process of stopping. A disconnected callback will
183 | * occur when the client actually stops.
184 | *
185 | * @return if the client was successfully set to stop.
186 | */
187 | public boolean stop() {
188 | if (state.compareAndSet(State.RUNNING, State.STOPPING)) {
189 | try {
190 | in.get().close();
191 | } catch (IOException e) {
192 | return false;
193 | }
194 | return true;
195 | }
196 | return false;
197 | }
198 |
199 | /**
200 | * Send the given message to the server.
201 | *
202 | * @param buffer
203 | * the message to send.
204 | * @return true if the message was sent to the server.
205 | * @throws IOException
206 | */
207 | public synchronized Boolean authWrite() throws IOException {
208 | String msg = uid + "," + getGameCode(game);
209 |
210 | int packLength = msg.length() + 16;
211 | byte[] message = new byte[4 + 2 + 2 + 4 + 4];
212 |
213 | // package length
214 | int offset = BruteForceCoding.encodeIntBigEndian(message, packLength, 0, 4 * BruteForceCoding.BSIZE);
215 | // header lenght
216 | offset = BruteForceCoding.encodeIntBigEndian(message, 16, offset, 2 * BruteForceCoding.BSIZE);
217 | // ver
218 | offset = BruteForceCoding.encodeIntBigEndian(message, 1, offset, 2 * BruteForceCoding.BSIZE);
219 | // operation
220 | offset = BruteForceCoding.encodeIntBigEndian(message, 7, offset, 4 * BruteForceCoding.BSIZE);
221 | // jsonp callback
222 | offset = BruteForceCoding.encodeIntBigEndian(message, 1, offset, 4 * BruteForceCoding.BSIZE);
223 |
224 | out.get().write(BruteForceCoding.add(message, msg.getBytes()));
225 | out.get().flush();
226 |
227 | return true;
228 |
229 | }
230 |
231 | /**
232 | * Send the given message to the server.
233 | *
234 | * @param buffer
235 | * the message to send.
236 | * @return true if the message was sent to the server.
237 | * @throws IOException
238 | */
239 | public synchronized Boolean heartBeatWrite() throws IOException {
240 | String msg = uid + "," + getGameCode(game);
241 |
242 | int packLength = msg.length() + 16;
243 | byte[] message = new byte[4 + 2 + 2 + 4 + 4];
244 |
245 | // package length
246 | int offset = BruteForceCoding.encodeIntBigEndian(message, packLength, 0, 4 * BruteForceCoding.BSIZE);
247 | // header lenght
248 | offset = BruteForceCoding.encodeIntBigEndian(message, 16, offset, 2 * BruteForceCoding.BSIZE);
249 | // ver
250 | offset = BruteForceCoding.encodeIntBigEndian(message, 1, offset, 2 * BruteForceCoding.BSIZE);
251 | // operation
252 | offset = BruteForceCoding.encodeIntBigEndian(message, 2, offset, 4 * BruteForceCoding.BSIZE);
253 | // jsonp callback
254 | offset = BruteForceCoding.encodeIntBigEndian(message, 1, offset, 4 * BruteForceCoding.BSIZE);
255 |
256 | out.get().write(BruteForceCoding.add(message, msg.getBytes()));
257 | out.get().flush();
258 |
259 | return true;
260 |
261 | }
262 |
263 | /****
264 | * get game code
265 | */
266 | private int getGameCode(String game) {
267 | int sum = 0;
268 | byte[] array = game.getBytes();
269 | for (int i = 0; i < array.length; i++) {
270 | sum += array[i];
271 | }
272 | return sum;
273 | }
274 |
275 | /*****
276 | * heart beat Thread
277 | */
278 | private void heartBeat() {
279 | Thread hbThread = new Thread(new HeartbeatTask());
280 | hbThread.start();
281 | }
282 |
283 | /**
284 | * Callback method for when the client receives a message from the server.
285 | *
286 | * @param message
287 | * the message from the server.
288 | */
289 | protected abstract void messageReceived(Long packageLength, Long headLength, Long version, Long operation, Long sequenceId, String message);
290 |
291 | /**
292 | * Callback method for when the client receives a message from the server.
293 | *
294 | * @param message
295 | * the message from the server.
296 | */
297 | protected abstract void messageReceived(String message);
298 |
299 | /**
300 | * Callback method for when the client receives a message from the server.
301 | *
302 | * @param message
303 | * the message from the server.
304 | */
305 | protected abstract void heartBeatReceived();
306 |
307 | /**
308 | * Callback method for when the client receives a message from the server.
309 | *
310 | * @param message
311 | * the message from the server.
312 | */
313 | protected abstract void authSuccess();
314 |
315 | /**
316 | * Callback method for when the client connects to the server.
317 | *
318 | * @param alreadyConnected
319 | * whether the client was already connected to the server.
320 | */
321 | protected abstract void connected(boolean alreadyConnected);
322 |
323 | /**
324 | * Callback method for when the client disconnects from the server.
325 | */
326 | protected abstract void disconnected();
327 |
328 | class HeartbeatTask implements Runnable {
329 |
330 | @Override
331 | public void run() {
332 | // TODO Auto-generated method stub
333 | // !Thread.currentThread().isInterrupted()
334 | while (true) {
335 | try {
336 | Thread.sleep(defaultHeartBeatTimeOut);
337 | } catch (InterruptedException e) {
338 | // TODO Auto-generated catch block
339 | e.printStackTrace();
340 | }
341 | try {
342 | heartBeatWrite();
343 | } catch (IOException e) {
344 | // TODO Auto-generated catch block
345 | e.printStackTrace();
346 | }
347 | }
348 | }
349 | }
350 | }
351 |
--------------------------------------------------------------------------------
/src/main/java/com/goim/bootstrap/BruteForceCoding.java:
--------------------------------------------------------------------------------
1 | package com.goim.bootstrap;
2 |
3 | public class BruteForceCoding {
4 |
5 | private static byte byteVal = 101; // one hundred and one
6 | private static short shortVal = 10001; // ten thousand and one
7 | private static int intVal = 100000001; // one hundred million and one
8 | private static long longVal = 1000000000001L;// one trillion and one
9 |
10 | public final static int BSIZE = Byte.SIZE / Byte.SIZE;
11 | public final static int SSIZE = Short.SIZE / Byte.SIZE;
12 | public final static int ISIZE = Integer.SIZE / Byte.SIZE;
13 | public final static int LSIZE = Long.SIZE / Byte.SIZE;
14 |
15 | public final static int BYTEMASK = 0xFF; // 8 bits
16 |
17 | public static String byteArrayToDecimalString(byte[] bArray) {
18 | StringBuilder rtn = new StringBuilder();
19 | for (byte b : bArray) {
20 | rtn.append(b & BYTEMASK).append(" ");
21 | }
22 | return rtn.toString();
23 | }
24 |
25 | // Warning: Untested preconditions (e.g., 0 <= size <= 8)
26 | public static int encodeIntBigEndian(byte[] dst, long val, int offset, int size) {
27 | for (int i = 0; i < size; i++) {
28 | dst[offset++] = (byte) (val >> ((size - i - 1) * Byte.SIZE));
29 | }
30 | return offset;
31 | }
32 |
33 | // Warning: Untested preconditions (e.g., 0 <= size <= 8)
34 | public static long decodeIntBigEndian(byte[] val, int offset, int size) {
35 | long rtn = 0;
36 | for (int i = 0; i < size; i++) {
37 | rtn = (rtn << Byte.SIZE) | ((long) val[offset + i] & BYTEMASK);
38 | }
39 | return rtn;
40 | }
41 |
42 | /**
43 | * An empty instance.
44 | */
45 | public static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
46 |
47 | /**
48 | * @param a
49 | * lower half
50 | * @param b
51 | * upper half
52 | * @return New array that has a in lower half and b in upper half.
53 | */
54 | public static byte[] add(final byte[] a, final byte[] b) {
55 | return add(a, b, BruteForceCoding.EMPTY_BYTE_ARRAY);
56 | }
57 |
58 | /**
59 | * @param a
60 | * first third
61 | * @param b
62 | * second third
63 | * @param c
64 | * third third
65 | * @return New array made from a, b and c
66 | */
67 | public static byte[] add(final byte[] a, final byte[] b, final byte[] c) {
68 | byte[] result = new byte[a.length + b.length + c.length];
69 | System.arraycopy(a, 0, result, 0, a.length);
70 | System.arraycopy(b, 0, result, a.length, b.length);
71 | System.arraycopy(c, 0, result, a.length + b.length, c.length);
72 | return result;
73 | }
74 |
75 | /**
76 | * @param a
77 | * array
78 | * @param length
79 | * amount of bytes to snarf
80 | * @return Last length
bytes from a
81 | */
82 | public static byte[] tail(final byte[] a, final int length) {
83 | if (a.length < length) {
84 | return null;
85 | }
86 | byte[] result = new byte[length];
87 | System.arraycopy(a, a.length - length, result, 0, length);
88 | return result;
89 | }
90 |
91 | /**
92 | * @param a
93 | * array
94 | * @param length
95 | * amount of bytes to snarf
96 | * @return Last length
bytes from a
97 | */
98 | public static byte[] tail(final byte[] a,final int beginPos, final int length) {
99 | if (a.length < length) {
100 | return null;
101 | }
102 | byte[] result = new byte[length];
103 | System.arraycopy(a, beginPos, result, 0, length);
104 | return result;
105 | }
106 |
107 | public static void main(String[] args) {
108 | byte[] message = new byte[BSIZE + SSIZE + ISIZE + LSIZE];
109 | // Encode the fields in the target byte array
110 | int offset = encodeIntBigEndian(message, byteVal, 0, BSIZE);
111 | offset = encodeIntBigEndian(message, shortVal, offset, SSIZE);
112 | offset = encodeIntBigEndian(message, intVal, offset, ISIZE);
113 | encodeIntBigEndian(message, longVal, offset, LSIZE);
114 | System.out.println("Encoded message: " + byteArrayToDecimalString(message));
115 |
116 | // Decode several fields
117 | long value = decodeIntBigEndian(message, BSIZE, SSIZE);
118 | System.out.println("Decoded short = " + value);
119 | value = decodeIntBigEndian(message, BSIZE + SSIZE + ISIZE, LSIZE);
120 | System.out.println("Decoded long = " + value);
121 |
122 | // Demonstrate dangers of conversion
123 | offset = 4;
124 | value = decodeIntBigEndian(message, offset, BSIZE);
125 | System.out.println("Decoded value (offset " + offset + ", size " + BSIZE + ") = " + value);
126 | byte bVal = (byte) decodeIntBigEndian(message, offset, BSIZE);
127 | System.out.println("Same value as byte = " + bVal);
128 | }
129 |
130 | }
131 |
--------------------------------------------------------------------------------
/src/main/java/com/goim/bootstrap/PushClient.java:
--------------------------------------------------------------------------------
1 | package com.goim.bootstrap;
2 |
3 | import java.net.InetAddress;
4 | import java.net.UnknownHostException;
5 | import java.util.Date;
6 | import java.util.Observable;
7 | import java.util.Observer;
8 |
9 | public class PushClient extends AbstractBlockingClient {
10 |
11 | public PushClient(InetAddress server, int port ,Integer uid ,String game) {
12 | super(server, port , uid, game);
13 | // TODO Auto-generated constructor stub
14 | }
15 |
16 | @Override
17 | protected void heartBeatReceived() {
18 | // TODO Auto-generated method stub
19 | System.out.println("heartBeatReceived ...");
20 | }
21 |
22 |
23 | @Override
24 | protected void authSuccess() {
25 | // TODO Auto-generated method stub
26 | System.out.println("authSuccess ...");
27 | }
28 |
29 | @Override
30 | protected void messageReceived(Long packageLength,Long headLength,Long version,Long operation,Long sequenceId,String message) {
31 | // TODO Auto-generated method stub
32 | StringBuilder sb = new StringBuilder();
33 | sb.append("-----------------------------" + new Date().getTime()+ "\n");
34 | sb.append("headLength:" + headLength + "\n");
35 | sb.append("version:" + version + "\n");
36 | sb.append("operation:" + operation + "\n");
37 | sb.append("sequenceId:" + sequenceId + "\n");
38 | sb.append("message:" + message + "\n");
39 | sb.append("-----------------------------");
40 | System.out.println(sb.toString());
41 |
42 | }
43 |
44 | @Override
45 | protected void messageReceived(String message) {
46 | // TODO Auto-generated method stub
47 | StringBuilder sb = new StringBuilder();
48 | sb.append(new Date().getTime() + "," + uid + ",message:" + message);
49 | System.out.println(sb.toString());
50 |
51 | }
52 |
53 | @Override
54 | protected void connected(boolean alreadyConnected) {
55 | // TODO Auto-generated method stub
56 | System.out.println("alreadyConnected is " + alreadyConnected);
57 | }
58 |
59 | @Override
60 | protected void disconnected() {
61 | // TODO Auto-generated method stub
62 | System.out.println("disconnected....... ");
63 |
64 | }
65 |
66 | class Listener implements Observer {
67 | @Override
68 | public void update(Observable o, Object arg) {
69 | System.out.println( "PushClient 死机" );
70 | PushClient pc = new PushClient(getServer(),getPort(),uid,game);
71 | pc.addObserver( this );
72 | new Thread(pc).start();
73 | System.out.println( "PushClient 重启" );
74 | }
75 | }
76 |
77 | public static void main(String[] args) throws UnknownHostException {
78 | PushClient cb = new PushClient(InetAddress.getByName("10.160.61.129"), 8080 , 1, "game");
79 | Listener listen = cb.new Listener();
80 | cb.addObserver(listen);
81 | Thread t = new Thread(cb);
82 | t.start();
83 | }
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/src/test/java/goim/goim_sdk/AppTest.java:
--------------------------------------------------------------------------------
1 | package goim.goim_sdk;
2 |
3 | import junit.framework.Test;
4 | import junit.framework.TestCase;
5 | import junit.framework.TestSuite;
6 |
7 | /**
8 | * Unit test for simple App.
9 | */
10 | public class AppTest
11 | extends TestCase
12 | {
13 | /**
14 | * Create the test case
15 | *
16 | * @param testName name of the test case
17 | */
18 | public AppTest( String testName )
19 | {
20 | super( testName );
21 | }
22 |
23 | /**
24 | * @return the suite of tests being tested
25 | */
26 | public static Test suite()
27 | {
28 | return new TestSuite( AppTest.class );
29 | }
30 |
31 | /**
32 | * Rigourous Test :-)
33 | */
34 | public void testApp()
35 | {
36 | assertTrue( true );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/target/classes/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Built-By: zhaojp
3 | Build-Jdk: 1.8.0_111
4 | Created-By: Maven Integration for Eclipse
5 |
6 |
--------------------------------------------------------------------------------
/target/classes/META-INF/maven/goim/goim-sdk/pom.properties:
--------------------------------------------------------------------------------
1 | #Generated by Maven Integration for Eclipse
2 | #Fri Apr 13 09:06:28 CST 2018
3 | version=0.0.1-SNAPSHOT
4 | groupId=goim
5 | m2e.projectName=goim-java-sdk
6 | m2e.projectLocation=/Users/zhaojp/eclipse-workspace/goim-java-sdk
7 | artifactId=goim-sdk
8 |
--------------------------------------------------------------------------------
/target/classes/META-INF/maven/goim/goim-sdk/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | jar
5 | goim
6 | goim-sdk
7 | 0.0.1-SNAPSHOT
8 | goim-sdk
9 | http://maven.apache.org
10 |
11 |
12 | UTF-8
13 |
14 |
15 |
16 |
17 | junit
18 | junit
19 | 3.8.1
20 | test
21 |
22 |
23 |
24 |
25 | goim-sdk
26 |
27 |
28 | org.apache.maven.plugins
29 | maven-compiler-plugin
30 | 3.1
31 |
32 | 1.8
33 | 1.8
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/target/classes/com/goim/bootstrap/AbstractBlockingClient$HeartbeatTask.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/roamdy/goim-java-sdk/040b8a46168490ec3cf9dbea4671f1db36b3d353/target/classes/com/goim/bootstrap/AbstractBlockingClient$HeartbeatTask.class
--------------------------------------------------------------------------------
/target/classes/com/goim/bootstrap/AbstractBlockingClient$State.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/roamdy/goim-java-sdk/040b8a46168490ec3cf9dbea4671f1db36b3d353/target/classes/com/goim/bootstrap/AbstractBlockingClient$State.class
--------------------------------------------------------------------------------
/target/classes/com/goim/bootstrap/AbstractBlockingClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/roamdy/goim-java-sdk/040b8a46168490ec3cf9dbea4671f1db36b3d353/target/classes/com/goim/bootstrap/AbstractBlockingClient.class
--------------------------------------------------------------------------------
/target/classes/com/goim/bootstrap/BruteForceCoding.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/roamdy/goim-java-sdk/040b8a46168490ec3cf9dbea4671f1db36b3d353/target/classes/com/goim/bootstrap/BruteForceCoding.class
--------------------------------------------------------------------------------
/target/classes/com/goim/bootstrap/PushClient$Listener.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/roamdy/goim-java-sdk/040b8a46168490ec3cf9dbea4671f1db36b3d353/target/classes/com/goim/bootstrap/PushClient$Listener.class
--------------------------------------------------------------------------------
/target/classes/com/goim/bootstrap/PushClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/roamdy/goim-java-sdk/040b8a46168490ec3cf9dbea4671f1db36b3d353/target/classes/com/goim/bootstrap/PushClient.class
--------------------------------------------------------------------------------
/target/test-classes/goim/goim_sdk/AppTest.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/roamdy/goim-java-sdk/040b8a46168490ec3cf9dbea4671f1db36b3d353/target/test-classes/goim/goim_sdk/AppTest.class
--------------------------------------------------------------------------------