diff --git a/cim_for_mina/cim-android-sdk/.classpath b/cim_for_mina/cim-android-sdk/.classpath index 664a9cb..f7a7951 100644 --- a/cim_for_mina/cim-android-sdk/.classpath +++ b/cim_for_mina/cim-android-sdk/.classpath @@ -5,6 +5,6 @@ - + diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMCacheManager.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMCacheManager.java index 55d4a4c..c278110 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMCacheManager.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMCacheManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMCacheProvider.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMCacheProvider.java index facbece..4e8204b 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMCacheProvider.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMCacheProvider.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMConnectorManager.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMConnectorManager.java index 67df9da..a9c2593 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMConnectorManager.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMConnectorManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -71,16 +71,18 @@ class CIMConnectorManager extends IoHandlerAdapter implements KeepAliveMessageFa private final String KEY_LAST_HEART_TIME = "KEY_LAST_HEART_TIME"; private NioSocketConnector connector; + private Context context; + private static CIMConnectorManager manager; + + private ExecutorService executor = Executors.newFixedThreadPool(1); private Semaphore semaphore = new Semaphore(1,true); - - private Context context; - - private static CIMConnectorManager manager; - private CIMConnectorManager(Context ctx) { context = ctx; - + makeNioConnector(); + } + + private void makeNioConnector() { connector = new NioSocketConnector(); connector.setConnectTimeoutMillis(CONNECT_TIMEOUT); connector.getSessionConfig().setTcpNoDelay(true); @@ -95,37 +97,30 @@ class CIMConnectorManager extends IoHandlerAdapter implements KeepAliveMessageFa connector.getFilterChain().addLast("codec", new ProtocolCodecFilter(new ClientMessageCodecFactory())); connector.getFilterChain().addLast("heartbeat", keepAliveaHandler); connector.getFilterChain().addLast("logger",CIMLoggingFilter.getLogger()); + connector.setHandler(this); - } - + + + public synchronized static CIMConnectorManager getManager(Context context) { + if (manager == null) { manager = new CIMConnectorManager(context); } + return manager; } - - private void handleConnectFailure(Throwable error,InetSocketAddress remoteAddress) { - long interval = CIMConstant.RECONN_INTERVAL_TIME - (5 * 1000 - new Random().nextInt(15 * 1000)); - - CIMLoggingFilter.getLogger().connectFailure(remoteAddress, interval); - - - Intent intent = new Intent(); - intent.setAction(CIMConstant.IntentAction.ACTION_CONNECTION_FAILED); - intent.putExtra(Exception.class.getName(), error.getClass().getSimpleName()); - intent.putExtra("interval", interval); - context.sendBroadcast(intent); - - } + + public void connect(final String host, final int port) { if (!isNetworkConnected(context)) { Intent intent = new Intent(); + intent.setPackage(context.getPackageName()); intent.setAction(CIMConstant.IntentAction.ACTION_CONNECTION_FAILED); intent.putExtra(Exception.class.getName(), NetworkDisabledException.class.getSimpleName()); context.sendBroadcast(intent); @@ -136,16 +131,21 @@ class CIMConnectorManager extends IoHandlerAdapter implements KeepAliveMessageFa if (isConnected() || !semaphore.tryAcquire()) { return; } - + + if(connector == null || connector.isDisposed()) { + makeNioConnector(); + } + executor.execute(new Runnable() { @Override public void run() { - CIMCacheManager.putBoolean(context, CIMCacheManager.KEY_CIM_CONNECTION_STATE, false); final InetSocketAddress remoteAddress = new InetSocketAddress(host, port); CIMLoggingFilter.getLogger().startConnect(remoteAddress); + CIMCacheManager.putBoolean(context, CIMCacheManager.KEY_CIM_CONNECTION_STATE, false); + connector.connect(remoteAddress).addListener(new IoFutureListener() { @Override public void operationComplete(ConnectFuture future) { @@ -160,7 +160,25 @@ class CIMConnectorManager extends IoHandlerAdapter implements KeepAliveMessageFa }); } + + + private void handleConnectFailure(Throwable error,InetSocketAddress remoteAddress) { + + long interval = CIMConstant.RECONN_INTERVAL_TIME - (5 * 1000 - new Random().nextInt(15 * 1000)); + + CIMLoggingFilter.getLogger().connectFailure(remoteAddress, interval); + + Intent intent = new Intent(); + intent.setPackage(context.getPackageName()); + intent.setAction(CIMConstant.IntentAction.ACTION_CONNECTION_FAILED); + intent.putExtra(Exception.class.getName(), error.getClass().getSimpleName()); + intent.putExtra("interval", interval); + context.sendBroadcast(intent); + + + } + public void send(SentBody body) { boolean isSuccessed = false; @@ -180,6 +198,7 @@ class CIMConnectorManager extends IoHandlerAdapter implements KeepAliveMessageFa if (!isSuccessed) { Intent intent = new Intent(); + intent.setPackage(context.getPackageName()); intent.setAction(CIMConstant.IntentAction.ACTION_SENT_FAILED); intent.putExtra(Exception.class.getName(), exceptionName); intent.putExtra(SentBody.class.getName(), body); @@ -196,9 +215,9 @@ class CIMConnectorManager extends IoHandlerAdapter implements KeepAliveMessageFa if (connector != null && !connector.isDisposed()) { connector.dispose(); + connector = null; } - manager = null; } public boolean isConnected() { @@ -214,6 +233,11 @@ class CIMConnectorManager extends IoHandlerAdapter implements KeepAliveMessageFa } public IoSession getCurrentSession() { + + if(connector == null || connector.isDisposed()) { + return null; + } + Map sessions = connector.getManagedSessions(); for (Long key : sessions.keySet()) { IoSession session = sessions.get(key); @@ -230,6 +254,7 @@ class CIMConnectorManager extends IoHandlerAdapter implements KeepAliveMessageFa setLastHeartbeatTime(session); Intent intent = new Intent(); + intent.setPackage(context.getPackageName()); intent.setAction(CIMConstant.IntentAction.ACTION_CONNECTION_SUCCESSED); context.sendBroadcast(intent); @@ -239,6 +264,7 @@ class CIMConnectorManager extends IoHandlerAdapter implements KeepAliveMessageFa public void sessionClosed(IoSession session) { Intent intent = new Intent(); + intent.setPackage(context.getPackageName()); intent.setAction(CIMConstant.IntentAction.ACTION_CONNECTION_CLOSED); context.sendBroadcast(intent); @@ -246,22 +272,25 @@ class CIMConnectorManager extends IoHandlerAdapter implements KeepAliveMessageFa @Override public void sessionIdle(IoSession session, IdleStatus status) { + /** * 用于解决,wifi情况下。偶而路由器与服务器断开连接时,客户端并没及时收到关闭事件 导致这样的情况下当前连接无效也不会重连的问题 * */ long lastHeartbeatTime = getLastHeartbeatTime(session); if (System.currentTimeMillis() - lastHeartbeatTime >= HEARBEAT_TIME_OUT) { - session.closeNow(); + session.closeOnFlush(); } } + @Override public void messageReceived(IoSession session, Object obj) { if (obj instanceof Message) { Intent intent = new Intent(); + intent.setPackage(context.getPackageName()); intent.setAction(CIMConstant.IntentAction.ACTION_MESSAGE_RECEIVED); intent.putExtra(Message.class.getName(), (Message) obj); context.sendBroadcast(intent); @@ -270,6 +299,7 @@ class CIMConnectorManager extends IoHandlerAdapter implements KeepAliveMessageFa if (obj instanceof ReplyBody) { Intent intent = new Intent(); + intent.setPackage(context.getPackageName()); intent.setAction(CIMConstant.IntentAction.ACTION_REPLY_RECEIVED); intent.putExtra(ReplyBody.class.getName(), (ReplyBody) obj); context.sendBroadcast(intent); @@ -280,6 +310,7 @@ class CIMConnectorManager extends IoHandlerAdapter implements KeepAliveMessageFa public void messageSent(IoSession session, Object message) { if (message instanceof SentBody) { Intent intent = new Intent(); + intent.setPackage(context.getPackageName()); intent.setAction(CIMConstant.IntentAction.ACTION_SENT_SUCCESSED); intent.putExtra(SentBody.class.getName(), (SentBody) message); context.sendBroadcast(intent); diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMEventBroadcastReceiver.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMEventBroadcastReceiver.java index 384b04a..9b49855 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMEventBroadcastReceiver.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMEventBroadcastReceiver.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMEventListener.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMEventListener.java index 33b5fe6..b904f54 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMEventListener.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMEventListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMListenerManager.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMListenerManager.java index f9879fd..b5b18b0 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMListenerManager.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMListenerManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMPushManager.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMPushManager.java index 7be847d..b61179c 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMPushManager.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMPushManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMPushService.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMPushService.java index 5c1f893..c962b3c 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMPushService.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMPushService.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/constant/CIMConstant.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/constant/CIMConstant.java index d4e8519..a503fde 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/constant/CIMConstant.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/constant/CIMConstant.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/exception/NetworkDisabledException.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/exception/NetworkDisabledException.java index 991783f..6ad7146 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/exception/NetworkDisabledException.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/exception/NetworkDisabledException.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/exception/SessionClosedException.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/exception/SessionClosedException.java index 1da2535..84e35d5 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/exception/SessionClosedException.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/exception/SessionClosedException.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageCodecFactory.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageCodecFactory.java index eaafcc3..fdcc050 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageCodecFactory.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageCodecFactory.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageDecoder.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageDecoder.java index 9915a4a..7c2b137 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageDecoder.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageEncoder.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageEncoder.java index 9a119ae..71e6f1b 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageEncoder.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageEncoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/HeartbeatRequest.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/HeartbeatRequest.java index 648f804..005964d 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/HeartbeatRequest.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/HeartbeatRequest.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/HeartbeatResponse.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/HeartbeatResponse.java index ddc161c..2920b92 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/HeartbeatResponse.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/HeartbeatResponse.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/Message.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/Message.java index 8dbf65f..d0185c5 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/Message.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/Message.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/Protobufable.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/Protobufable.java index 3c95b02..9970e4b 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/Protobufable.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/Protobufable.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/ReplyBody.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/ReplyBody.java index 7eaf751..d8838b8 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/ReplyBody.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/ReplyBody.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/SentBody.java b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/SentBody.java index c4733b0..2b4a581 100644 --- a/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/SentBody.java +++ b/cim_for_mina/cim-android-sdk/src/com/farsunset/cim/sdk/android/model/SentBody.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2033 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_mina/cim-client-android/app/libs/cim-android-sdk-3.5.jar b/cim_for_mina/cim-client-android/app/libs/cim-android-sdk-3.5.jar index f32b4f9..d2827a4 100644 Binary files a/cim_for_mina/cim-client-android/app/libs/cim-android-sdk-3.5.jar and b/cim_for_mina/cim-client-android/app/libs/cim-android-sdk-3.5.jar differ diff --git a/cim_for_mina/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/decoder/WebMessageDecoder.java b/cim_for_mina/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/decoder/WebMessageDecoder.java index 5307c62..bb2fb35 100644 --- a/cim_for_mina/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/decoder/WebMessageDecoder.java +++ b/cim_for_mina/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/decoder/WebMessageDecoder.java @@ -210,7 +210,6 @@ public class WebMessageDecoder extends MessageDecoderAdapter { } private void handleClose(IoSession iosession, IoBuffer in) { - in.get(new byte[in.remaining()]); iosession.closeOnFlush(); } diff --git a/cim_for_netty/cim-android-sdk/.classpath b/cim_for_netty/cim-android-sdk/.classpath index cf06537..e8641d6 100644 --- a/cim_for_netty/cim-android-sdk/.classpath +++ b/cim_for_netty/cim-android-sdk/.classpath @@ -9,6 +9,6 @@ - + diff --git a/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMConnectorManager.java b/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMConnectorManager.java index e3743c0..27c10b0 100644 --- a/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMConnectorManager.java +++ b/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/CIMConnectorManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -83,7 +83,11 @@ class CIMConnectorManager extends SimpleChannelInboundHandler { private CIMConnectorManager(Context ctx) { context = ctx; + makeNioBootstrap(); + } + + private void makeNioBootstrap() { bootstrap = new Bootstrap(); loopGroup = new NioEventLoopGroup(1); bootstrap.group(loopGroup); @@ -101,7 +105,6 @@ class CIMConnectorManager extends SimpleChannelInboundHandler { ch.pipeline().addLast(CIMConnectorManager.this); } }); - } public synchronized static CIMConnectorManager getManager(Context context) { @@ -118,8 +121,8 @@ class CIMConnectorManager extends SimpleChannelInboundHandler { CIMLoggingHandler.getLogger().connectFailure(remoteAddress, interval); - Intent intent = new Intent(); - intent.setAction(CIMConstant.IntentAction.ACTION_CONNECTION_FAILED); + Intent intent = new Intent(CIMConstant.IntentAction.ACTION_CONNECTION_FAILED); + intent.setPackage(context.getPackageName()); intent.putExtra(Exception.class.getName(), error.getClass().getSimpleName()); intent.putExtra("interval", interval); context.sendBroadcast(intent); @@ -133,8 +136,8 @@ class CIMConnectorManager extends SimpleChannelInboundHandler { if (!isNetworkConnected(context)) { - Intent intent = new Intent(); - intent.setAction(CIMConstant.IntentAction.ACTION_CONNECTION_FAILED); + Intent intent = new Intent(CIMConstant.IntentAction.ACTION_CONNECTION_FAILED); + intent.setPackage(context.getPackageName()); intent.putExtra(Exception.class.getName(), NetworkDisabledException.class.getSimpleName()); context.sendBroadcast(intent); @@ -144,6 +147,10 @@ class CIMConnectorManager extends SimpleChannelInboundHandler { if (isConnected() || !semaphore.tryAcquire()) { return; } + + if (bootstrap == null || loopGroup.isShutdown()) { + makeNioBootstrap(); + } executor.execute(new Runnable() { @Override @@ -187,14 +194,14 @@ class CIMConnectorManager extends SimpleChannelInboundHandler { } if (!isSuccessed) { - Intent intent = new Intent(); - intent.setAction(CIMConstant.IntentAction.ACTION_SENT_FAILED); + Intent intent = new Intent(CIMConstant.IntentAction.ACTION_SENT_FAILED); + intent.setPackage(context.getPackageName()); intent.putExtra(Exception.class.getName(), exceptionName); intent.putExtra(SentBody.class.getName(), body); context.sendBroadcast(intent); } else { - Intent intent = new Intent(); - intent.setAction(CIMConstant.IntentAction.ACTION_SENT_SUCCESSED); + Intent intent = new Intent(CIMConstant.IntentAction.ACTION_SENT_SUCCESSED); + intent.setPackage(context.getPackageName()); intent.putExtra(SentBody.class.getName(), (SentBody) body); context.sendBroadcast(intent); } @@ -210,7 +217,6 @@ class CIMConnectorManager extends SimpleChannelInboundHandler { loopGroup.shutdownGracefully(); } - manager = null; } public boolean isConnected() { @@ -229,8 +235,8 @@ class CIMConnectorManager extends SimpleChannelInboundHandler { setLastHeartbeatTime(ctx.channel()); - Intent intent = new Intent(); - intent.setAction(CIMConstant.IntentAction.ACTION_CONNECTION_SUCCESSED); + Intent intent = new Intent(CIMConstant.IntentAction.ACTION_CONNECTION_SUCCESSED); + intent.setPackage(context.getPackageName()); context.sendBroadcast(intent); } @@ -238,8 +244,8 @@ class CIMConnectorManager extends SimpleChannelInboundHandler { @Override public void channelInactive(ChannelHandlerContext ctx) { - Intent intent = new Intent(); - intent.setAction(CIMConstant.IntentAction.ACTION_CONNECTION_CLOSED); + Intent intent = new Intent(CIMConstant.IntentAction.ACTION_CONNECTION_CLOSED); + intent.setPackage(context.getPackageName()); context.sendBroadcast(intent); } @@ -264,16 +270,16 @@ class CIMConnectorManager extends SimpleChannelInboundHandler { public void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof Message) { - Intent intent = new Intent(); - intent.setAction(CIMConstant.IntentAction.ACTION_MESSAGE_RECEIVED); + Intent intent = new Intent(CIMConstant.IntentAction.ACTION_MESSAGE_RECEIVED); + intent.setPackage(context.getPackageName()); intent.putExtra(Message.class.getName(), (Message) msg); context.sendBroadcast(intent); } if (msg instanceof ReplyBody) { - Intent intent = new Intent(); - intent.setAction(CIMConstant.IntentAction.ACTION_REPLY_RECEIVED); + Intent intent = new Intent(CIMConstant.IntentAction.ACTION_REPLY_RECEIVED); + intent.setPackage(context.getPackageName()); intent.putExtra(ReplyBody.class.getName(), (ReplyBody) msg); context.sendBroadcast(intent); } diff --git a/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/CIMLoggingHandler.java b/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/CIMLoggingHandler.java index 1ed5937..cf089b8 100644 --- a/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/CIMLoggingHandler.java +++ b/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/CIMLoggingHandler.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageDecoder.java b/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageDecoder.java index 4b16445..c53ab1e 100644 --- a/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageDecoder.java +++ b/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageEncoder.java b/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageEncoder.java index 351fe57..d7fc81c 100644 --- a/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageEncoder.java +++ b/cim_for_netty/cim-android-sdk/src/com/farsunset/cim/sdk/android/filter/ClientMessageEncoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-client-android/app/libs/cim-android-sdk-3.5.jar b/cim_for_netty/cim-client-android/app/libs/cim-android-sdk-3.5.jar index 01bf8b6..0ec8975 100644 Binary files a/cim_for_netty/cim-client-android/app/libs/cim-android-sdk-3.5.jar and b/cim_for_netty/cim-client-android/app/libs/cim-android-sdk-3.5.jar differ diff --git a/cim_for_netty/cim-server-sdk/.classpath b/cim_for_netty/cim-server-sdk/.classpath index c44d29e..7d38a09 100644 --- a/cim_for_netty/cim-server-sdk/.classpath +++ b/cim_for_netty/cim-server-sdk/.classpath @@ -3,7 +3,7 @@ - + diff --git a/cim_for_netty/cim-server-sdk/.settings/org.eclipse.jdt.core.prefs b/cim_for_netty/cim-server-sdk/.settings/org.eclipse.jdt.core.prefs index c537b63..0c68a61 100644 --- a/cim_for_netty/cim-server-sdk/.settings/org.eclipse.jdt.core.prefs +++ b/cim_for_netty/cim-server-sdk/.settings/org.eclipse.jdt.core.prefs @@ -1,7 +1,7 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/constant/CIMConstant.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/constant/CIMConstant.java index 7393831..119eb83 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/constant/CIMConstant.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/constant/CIMConstant.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/ServerMessageDecoder.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/ServerMessageDecoder.java index 5a832da..ba61075 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/ServerMessageDecoder.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/ServerMessageDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/ServerMessageEncoder.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/ServerMessageEncoder.java index cfcaa68..004e819 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/ServerMessageEncoder.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/ServerMessageEncoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/decoder/AppMessageDecoder.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/decoder/AppMessageDecoder.java index 0cb5579..c83c422 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/decoder/AppMessageDecoder.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/decoder/AppMessageDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/decoder/WebMessageDecoder.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/decoder/WebMessageDecoder.java index 997b3a2..aedd48a 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/decoder/WebMessageDecoder.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/filter/decoder/WebMessageDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/handler/CIMNioSocketAcceptor.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/handler/CIMNioSocketAcceptor.java index aab710b..759a972 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/handler/CIMNioSocketAcceptor.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/handler/CIMNioSocketAcceptor.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,10 +34,12 @@ import com.farsunset.cim.sdk.server.session.CIMSession; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.Channel; +import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelHandler.Sharable; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; +import io.netty.channel.EventLoopGroup; import io.netty.channel.SimpleChannelInboundHandler; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; @@ -82,7 +84,9 @@ public class CIMNioSocketAcceptor extends SimpleChannelInboundHandler innerHandlerMap.put(WEBSOCKET_HANDLER_KEY, new WebsocketHandler()); ServerBootstrap bootstrap = new ServerBootstrap(); - bootstrap.group(new NioEventLoopGroup(), new NioEventLoopGroup()); + EventLoopGroup bossGroup = new NioEventLoopGroup(); + EventLoopGroup workerGroup = new NioEventLoopGroup(); + bootstrap.group(bossGroup, workerGroup); bootstrap.childOption(ChannelOption.TCP_NODELAY, true); bootstrap.childOption(ChannelOption.SO_KEEPALIVE, true); bootstrap.channel(NioServerSocketChannel.class); @@ -99,6 +103,14 @@ public class CIMNioSocketAcceptor extends SimpleChannelInboundHandler }); bootstrap.bind(port); + + ChannelFuture channelFuture = bootstrap.bind(port).syncUninterruptibly(); + + channelFuture.channel().closeFuture().addListener(future -> { + bossGroup.shutdownGracefully(); + workerGroup.shutdownGracefully(); + }); + } /** diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/handler/CIMRequestHandler.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/handler/CIMRequestHandler.java index 2c78bb3..16aa5b8 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/handler/CIMRequestHandler.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/handler/CIMRequestHandler.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/handler/WebsocketHandler.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/handler/WebsocketHandler.java index 1dad634..1f7aab2 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/handler/WebsocketHandler.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/handler/WebsocketHandler.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/HandshakerResponse.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/HandshakerResponse.java index 0928ceb..b71cd50 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/HandshakerResponse.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/HandshakerResponse.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/HeartbeatRequest.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/HeartbeatRequest.java index 77915d6..172bbd2 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/HeartbeatRequest.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/HeartbeatRequest.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/HeartbeatResponse.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/HeartbeatResponse.java index e010abc..3f54b31 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/HeartbeatResponse.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/HeartbeatResponse.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/Message.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/Message.java index 6e46f95..e9e02ba 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/Message.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/Message.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/ReplyBody.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/ReplyBody.java index d4d079c..d35b00d 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/ReplyBody.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/ReplyBody.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/SentBody.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/SentBody.java index 1025369..8a148b2 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/SentBody.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/SentBody.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/feature/EncodeFormatable.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/feature/EncodeFormatable.java index af57438..5ef9d5f 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/feature/EncodeFormatable.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/feature/EncodeFormatable.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/proto/MessageProto.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/proto/MessageProto.java index 1916dab..8aa073c 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/proto/MessageProto.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/proto/MessageProto.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/proto/ReplyBodyProto.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/proto/ReplyBodyProto.java index 5c7420c..d4cbab2 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/proto/ReplyBodyProto.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/proto/ReplyBodyProto.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/proto/SentBodyProto.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/proto/SentBodyProto.java index e86f011..bf53d62 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/proto/SentBodyProto.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/model/proto/SentBodyProto.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/session/CIMSession.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/session/CIMSession.java index 1155df8..b8f13d4 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/session/CIMSession.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/session/CIMSession.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/session/DefaultSessionManager.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/session/DefaultSessionManager.java index 30a4043..ba537c4 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/session/DefaultSessionManager.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/session/DefaultSessionManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/session/SessionManager.java b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/session/SessionManager.java index 390d18b..d067129 100644 --- a/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/session/SessionManager.java +++ b/cim_for_netty/cim-server-sdk/src/com/farsunset/cim/sdk/server/session/SessionManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2013-2023 Xia Jun(3979434@qq.com). + * Copyright 2013-2019 Xia Jun(3979434@qq.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.