├── DotCGSF
├── CGSFNET64Lib
│ ├── Compress.h
│ ├── app.rc
│ ├── app.ico
│ ├── resource.h
│ ├── SFNETMultiDispatcher.cpp
│ ├── ServerConnectReceiveCallback.h
│ ├── Stdafx.cpp
│ ├── CgsfNET64Lib.vcxproj.user
│ ├── Stdafx.h
│ ├── FRAMEWORK_ERROR_CODE.h
│ ├── DESEncrypt.h
│ ├── Helper.h
│ ├── AssemblyInfo.cpp
│ ├── CgsfNET64Lib.filters
│ └── SFNETMultiDispatcher.h
├── EchoServerNet
│ ├── App.config
│ ├── Properties
│ │ ├── Settings.settings
│ │ ├── Settings.Designer.cs
│ │ └── AssemblyInfo.cs
│ ├── Program.cs
│ ├── ServerNetwork.cs
│ └── EchoServerNet.csproj.user
└── CGSFNET64Common
│ ├── packages.config
│ ├── app.config
│ ├── FileLogger.cs
│ ├── JsonEnDecode.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── CGSFNETCommon.sln
│ └── NLog.config
├── DatabaseLayer
├── SFDBManager.cpp
├── DBMsg.h
├── SFDBManager.h
├── SFDBRequest.cpp
├── SFDatabaseSQLite.cpp
├── SFDatabase.cpp
├── SFDBAdaptor.cpp
├── DBStruct.h
├── IDBManager.h
├── stdafx.cpp
├── targetver.h
├── SFDatabaseProxyRemote.h
├── SFDatabaseSQLite.h
├── SFMSSQLAdaptor.h
├── SFZdb.h
├── SFZdbAdpator.h
├── SFFastDBAdaptor.h
├── SFZdbAdpator.cpp
├── SFFastDBAdaptor.cpp
├── SFMSSQLAdaptor.cpp
├── SFDBRequest.h
├── SFDatabaseProxyImpl.h
├── SFDataBaseProxy.h
├── SFDBAdaptor.h
├── stdafx.h
├── SFZdb.cpp
├── SFDBWorker.h
├── SFDBWorker.cpp
├── SFDatabaseProxyLocal.h
├── SFDatabase.h
└── SFDBPacketSystem.h
├── CGSFNet
├── IEngine.h
├── ACEEngine.h
├── ErrorCode.h
├── EngineConstant.h
├── INetworkEngine.h
├── WorkerThread.h
├── WorkerThread.cpp
├── PeerInfo.h
├── IServerCallback.h
├── InterlockedValue.h
├── ACEHeader.h
├── EngineStructure.h
├── IPacketProtocol.h
├── CommonStructure.h
├── InterlockedValue.cpp
├── ISessionService.h
├── ACETimeOutHandler.h
├── ProactorAcceptor.h
├── INetworkCallback.h
├── IDMap.h
├── Lock.h
├── ISession.h
├── ProactorAcceptor.cpp
├── ProactorService.h
└── ServiceManager.h
├── BaseLayer
├── SFMath.h
├── SFDispatch.h
├── SFTSSyncQueue.h
├── SFRegexChecker.cpp
├── BaseLayer.vcxproj.user
├── CMakeLists.txt
├── base64.h
├── SFConsumer.h
├── SFCompressZLib.h
├── SFCompressor.h
├── SFEncryptionXOR.h
├── BaseCommonHeader.h
├── BaseLayerLinux.vcxproj.user
├── Macro.h
├── SFRegexChecker.h
├── SFFastCRC.h
├── SFEncryption.h
├── SFCompressZLib.cpp
├── CGSFDefine.h
├── SFTree.h
├── SFLockDeque.h
├── SFEncryptionXOR.cpp
├── SFLock.h
├── SFLockQueue.h
├── SFList.h
├── ConcurrentQueue.h
├── BitSet.h
├── ReadMe.txt
├── SFQueue.h
└── SFObjectPool.h
├── Bin
├── Debug
│ ├── ACEd.dll
│ ├── libglog.dll
│ ├── EngineConfig.xml
│ └── ServerConnection.xml
└── Release
│ ├── ACE.dll
│ ├── libglog.dll
│ ├── boost_chrono-vc140-mt-1_60.dll
│ ├── boost_system-vc140-mt-1_60.dll
│ ├── boost_thread-vc140-mt-1_60.dll
│ ├── EngineConfig.xml
│ └── ServerConnection.xml
├── EngineLayer
├── SFConstant.h
├── SFEngine.cpp
├── SFLogicDispatcher.cpp
├── SFLogicDispatcher.h
├── SFPacketProtocol.h
├── SFClassicDispatcher.cpp
├── SFMultiLogicDispatcher.cpp
├── SFSingleLogicDispatcher.cpp
├── SFObject.h
├── SFObject.cpp
├── SFProtobufPacket.cpp
├── EngineLayer.vcxproj.user
├── CommonHeader.h
├── EngineLayerLinux.vcxproj.user
├── SFPacketProtocol.cpp
├── SFObserver.h
├── SFProducer.h
├── SFCheckSum.h
├── SFObserver.cpp
├── stdafx.cpp
├── SFPacketPool.h
├── SFPacketIOBuffer.h
├── SFClassicDispatcher.h
├── SFBasePacketProtocol.cpp
├── SFPacketPool.cpp
├── SFSessionService.cpp
├── SFIOCPFramework.h
├── SFIOCPFramework.cpp
├── LogicEntry.h
├── SFBasePacketProtocol.h
├── SFSessionService.h
├── SFACEAllocator.h
├── SFExcel.h
├── SFJsonPacket.h
├── ILogicDispatcher.h
├── SFMacro.h
├── SFSubject.h
├── SFLogicGateway.cpp
├── SFLogicGateway.h
├── ILogicEntry.h
├── SFJsonPacket.cpp
├── targetver.h
├── SFProtocol.cpp
├── SFCGSFPacketProtocol.h
├── SFJsonProtocol.h
├── SFProtobufPacket.h
├── SFSingleLogicDispatcher.h
├── JsonBuilder.h
├── stdafx.h
├── SFConfigure.h
├── INetworkFramework.h
├── SFConfigure.cpp
├── EngineLayerHeader.h
├── SFServerConnectionManager.h
├── visitor.h
├── SFIOBuffer.h
├── SFShouter.h
├── ReadMe.txt
├── SFSubject.cpp
├── SFProtobufPacketImpl.h
├── SFFactory.h
├── SFProtobufProtocol.h
├── SFProtobufPacketImpl.cpp
├── SFProtobufExtensionProtocol.h
├── ILogicEntry.cpp
├── DataBuffer.h
├── SFProtobuf2ExtensionProtocol.h
├── SFMultiLogicDispatcher.h
└── SFMGClient.cpp
├── Sample
├── Common
│ ├── protoc.exe
│ ├── tank_cppgen.bat
│ ├── Tank_csgen.bat
│ ├── protobuf-net r668
│ │ ├── ProtoGen
│ │ │ ├── protogen.exe
│ │ │ ├── protogen.pdb
│ │ │ ├── protobuf-net.dll
│ │ │ ├── protobuf-net.pdb
│ │ │ ├── protogen.exe.config
│ │ │ ├── protoc-license.txt
│ │ │ ├── Licence.txt
│ │ │ └── xml.xslt
│ │ ├── Full
│ │ │ ├── sl4
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── wp8
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── cf20
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── cf35
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── mono
│ │ │ │ └── protobuf-net.dll
│ │ │ ├── net11
│ │ │ │ └── protobuf-net.dll
│ │ │ ├── net20
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── net30
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── unity
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── wp71
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── portable
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ └── netcore45
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ ├── protobuf-net.pdb
│ │ │ │ └── protobuf-net.pri
│ │ ├── Precompile
│ │ │ ├── precompile.exe
│ │ │ ├── precompile.pdb
│ │ │ ├── protobuf-net.dll
│ │ │ ├── protobuf-net.pdb
│ │ │ ├── IKVM.Reflection.dll
│ │ │ └── Licence.txt
│ │ ├── CoreOnly
│ │ │ ├── cf20
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── cf35
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── ios
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── mono
│ │ │ │ └── protobuf-net.dll
│ │ │ ├── sl4
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── wp71
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── wp8
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── net11
│ │ │ │ └── protobuf-net.dll
│ │ │ ├── net30
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ │ ├── netcore45
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ ├── protobuf-net.pdb
│ │ │ │ └── protobuf-net.pri
│ │ │ └── portable
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.pdb
│ │ └── Licence.txt
│ ├── protobuf_cppgen.bat
│ ├── protobuf_csgen.bat
│ └── SampleMessage.proto
├── TankServer
│ ├── stdafx.h
│ ├── stdafx.cpp
│ ├── targetver.h
│ ├── TankServer.cpp
│ ├── TankProtocol.h
│ ├── TankLogicEntry.h
│ ├── TankServer.vcxproj.user
│ ├── TankProtocol.cpp
│ ├── TankLogicEntry.cpp
│ └── ReadMe.txt
├── EchoServer
│ ├── targetver.h
│ ├── EchoServreLinux.vcxproj.user
│ ├── EchoServerHeader.h
│ ├── EchoLogicEntry.h
│ ├── EchoLogicEntry.cpp
│ ├── EchoServer.vcxproj.user
│ ├── EchoServer.cpp
│ ├── ReadMe.txt
│ └── EchoServer.vcxproj.filters
├── ProtoBufServer
│ ├── stdafx.cpp
│ ├── stdafx.h
│ ├── targetver.h
│ ├── ProtoBufServer.cpp
│ ├── ProtoBufProtocol.h
│ ├── ProtoBufServer.vcxproj.user
│ ├── TankServer.vcxproj.user
│ ├── ProtoBufLogicEntry.h
│ ├── ProtoBufProtocol.cpp
│ ├── ProtoBufLogicEntry.cpp
│ └── ReadMe.txt
├── ServerConnector
│ ├── stdafx.h
│ ├── stdafx.cpp
│ ├── targetver.h
│ ├── ServerConnector.cpp
│ ├── AuthServerCallback.h
│ ├── DatabaseServerCallback.h
│ ├── AuthServerCallback.cpp
│ ├── DatabaseServerCallback.cpp
│ ├── ServerConnectorLogicEntry.h
│ ├── ServerConnectorLogicEntry.cpp
│ └── ReadMe.txt
├── ServerListener
│ ├── stdafx.cpp
│ ├── stdafx.h
│ ├── targetver.h
│ ├── ServerListener.cpp
│ ├── ServerListenerLogicEntry.h
│ ├── ServerListener.vcxproj.user
│ ├── ServerListenerLogicEntry.cpp
│ ├── ReadMe.txt
│ └── ServerListener.vcxproj.filters
└── ProtobufUnity
│ ├── ProjectSettings
│ ├── ProjectVersion.txt
│ ├── TagManager.asset
│ ├── TimeManager.asset
│ ├── AudioManager.asset
│ ├── EditorSettings.asset
│ ├── InputManager.asset
│ ├── NavMeshAreas.asset
│ ├── NetworkManager.asset
│ ├── DynamicsManager.asset
│ ├── GraphicsSettings.asset
│ ├── ProjectSettings.asset
│ ├── QualitySettings.asset
│ ├── UnityAdsSettings.asset
│ ├── ClusterInputManager.asset
│ ├── EditorBuildSettings.asset
│ ├── Physics2DSettings.asset
│ └── UnityConnectSettings.asset
│ ├── Assets
│ ├── Scene
│ │ ├── CGSFClient.unity
│ │ └── CGSFClient.unity.meta
│ ├── ProtoBuf
│ │ ├── protobuf-net.dll
│ │ ├── protobuf-net.pdb
│ │ ├── protobuf-net.dll.mdb
│ │ ├── protobuf-net.pdb.meta
│ │ ├── protobuf-net.xml.meta
│ │ ├── protobuf-net.dll.mdb.meta
│ │ └── protobuf-net.dll.meta
│ ├── Scripts
│ │ ├── Network
│ │ │ ├── UDP.cs
│ │ │ ├── INetworkInterface.cs
│ │ │ ├── UDP.cs.meta
│ │ │ ├── TCPNetwork.cs.meta
│ │ │ ├── CGSFNetProtocol.cs.meta
│ │ │ ├── INetworkInterface.cs.meta
│ │ │ ├── NetworkController.cs.meta
│ │ │ ├── SampleMessage.cs.meta
│ │ │ └── NetworkController.cs
│ │ ├── Common.meta
│ │ ├── Network.meta
│ │ ├── UIRoot.cs.meta
│ │ └── Common
│ │ │ └── Singleton.cs.meta
│ ├── Scene.meta
│ ├── Scripts.meta
│ └── ProtoBuf.meta
│ ├── CGSFUnity.sln
│ └── ProtobufUnity.sln
└── README.md
/DotCGSF/CGSFNET64Lib/Compress.h:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/DatabaseLayer/SFDBManager.cpp:
--------------------------------------------------------------------------------
1 | #include "StdAfx.h"
2 | #include "SFDBManager.h"
--------------------------------------------------------------------------------
/CGSFNet/IEngine.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/CGSFNet/IEngine.h
--------------------------------------------------------------------------------
/BaseLayer/SFMath.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/BaseLayer/SFMath.h
--------------------------------------------------------------------------------
/Bin/Debug/ACEd.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Bin/Debug/ACEd.dll
--------------------------------------------------------------------------------
/Bin/Release/ACE.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Bin/Release/ACE.dll
--------------------------------------------------------------------------------
/CGSFNet/ACEEngine.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/CGSFNet/ACEEngine.h
--------------------------------------------------------------------------------
/CGSFNet/ErrorCode.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/CGSFNet/ErrorCode.h
--------------------------------------------------------------------------------
/BaseLayer/SFDispatch.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/BaseLayer/SFDispatch.h
--------------------------------------------------------------------------------
/Bin/Debug/libglog.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Bin/Debug/libglog.dll
--------------------------------------------------------------------------------
/Bin/Release/libglog.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Bin/Release/libglog.dll
--------------------------------------------------------------------------------
/CGSFNet/EngineConstant.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/CGSFNet/EngineConstant.h
--------------------------------------------------------------------------------
/CGSFNet/INetworkEngine.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/CGSFNet/INetworkEngine.h
--------------------------------------------------------------------------------
/EngineLayer/SFConstant.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/EngineLayer/SFConstant.h
--------------------------------------------------------------------------------
/EngineLayer/SFEngine.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/EngineLayer/SFEngine.cpp
--------------------------------------------------------------------------------
/EngineLayer/SFLogicDispatcher.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "SFLogicDispatcher.h"
3 |
--------------------------------------------------------------------------------
/Sample/Common/protoc.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protoc.exe
--------------------------------------------------------------------------------
/BaseLayer/SFTSSyncQueue.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/BaseLayer/SFTSSyncQueue.h
--------------------------------------------------------------------------------
/DatabaseLayer/DBMsg.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | typedef enum eDBMSG
4 | {
5 | DBMSG_LOGIN = 1000,
6 | };
--------------------------------------------------------------------------------
/DatabaseLayer/SFDBManager.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/DatabaseLayer/SFDBManager.h
--------------------------------------------------------------------------------
/DotCGSF/CGSFNET64Lib/app.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/DotCGSF/CGSFNET64Lib/app.rc
--------------------------------------------------------------------------------
/Sample/TankServer/stdafx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/TankServer/stdafx.h
--------------------------------------------------------------------------------
/BaseLayer/SFRegexChecker.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/BaseLayer/SFRegexChecker.cpp
--------------------------------------------------------------------------------
/DatabaseLayer/SFDBRequest.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/DatabaseLayer/SFDBRequest.cpp
--------------------------------------------------------------------------------
/DotCGSF/CGSFNET64Lib/app.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/DotCGSF/CGSFNET64Lib/app.ico
--------------------------------------------------------------------------------
/Sample/EchoServer/targetver.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/EchoServer/targetver.h
--------------------------------------------------------------------------------
/Sample/TankServer/stdafx.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/TankServer/stdafx.cpp
--------------------------------------------------------------------------------
/Sample/TankServer/targetver.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/TankServer/targetver.h
--------------------------------------------------------------------------------
/EngineLayer/SFLogicDispatcher.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/EngineLayer/SFLogicDispatcher.h
--------------------------------------------------------------------------------
/EngineLayer/SFPacketProtocol.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/EngineLayer/SFPacketProtocol.h
--------------------------------------------------------------------------------
/Sample/ProtoBufServer/stdafx.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtoBufServer/stdafx.cpp
--------------------------------------------------------------------------------
/Sample/ProtoBufServer/stdafx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtoBufServer/stdafx.h
--------------------------------------------------------------------------------
/Sample/ServerConnector/stdafx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ServerConnector/stdafx.h
--------------------------------------------------------------------------------
/Sample/ServerListener/stdafx.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ServerListener/stdafx.cpp
--------------------------------------------------------------------------------
/Sample/ServerListener/stdafx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ServerListener/stdafx.h
--------------------------------------------------------------------------------
/Sample/TankServer/TankServer.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/TankServer/TankServer.cpp
--------------------------------------------------------------------------------
/DatabaseLayer/SFDatabaseSQLite.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/DatabaseLayer/SFDatabaseSQLite.cpp
--------------------------------------------------------------------------------
/Sample/ProtoBufServer/targetver.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtoBufServer/targetver.h
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 5.3.4f1
2 | m_StandardAssetsVersion: 0
3 |
--------------------------------------------------------------------------------
/Sample/ServerConnector/stdafx.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ServerConnector/stdafx.cpp
--------------------------------------------------------------------------------
/Sample/ServerConnector/targetver.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ServerConnector/targetver.h
--------------------------------------------------------------------------------
/Sample/ServerListener/targetver.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ServerListener/targetver.h
--------------------------------------------------------------------------------
/DatabaseLayer/SFDatabase.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "SFDatabase.h"
3 |
4 | _DBConnectionInfo SFDatabase::m_Info;
--------------------------------------------------------------------------------
/EngineLayer/SFClassicDispatcher.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/EngineLayer/SFClassicDispatcher.cpp
--------------------------------------------------------------------------------
/EngineLayer/SFMultiLogicDispatcher.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/EngineLayer/SFMultiLogicDispatcher.cpp
--------------------------------------------------------------------------------
/EngineLayer/SFSingleLogicDispatcher.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/EngineLayer/SFSingleLogicDispatcher.cpp
--------------------------------------------------------------------------------
/Bin/Release/boost_chrono-vc140-mt-1_60.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Bin/Release/boost_chrono-vc140-mt-1_60.dll
--------------------------------------------------------------------------------
/Bin/Release/boost_system-vc140-mt-1_60.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Bin/Release/boost_system-vc140-mt-1_60.dll
--------------------------------------------------------------------------------
/Bin/Release/boost_thread-vc140-mt-1_60.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Bin/Release/boost_thread-vc140-mt-1_60.dll
--------------------------------------------------------------------------------
/CGSFNet/WorkerThread.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | void ProactorWorkerThread(void* Args);
4 | void ReactorWorkerThread(void* Args);
5 |
--------------------------------------------------------------------------------
/Sample/ProtoBufServer/ProtoBufServer.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtoBufServer/ProtoBufServer.cpp
--------------------------------------------------------------------------------
/Sample/ServerConnector/ServerConnector.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ServerConnector/ServerConnector.cpp
--------------------------------------------------------------------------------
/Sample/ServerListener/ServerListener.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ServerListener/ServerListener.cpp
--------------------------------------------------------------------------------
/DotCGSF/CGSFNET64Lib/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by app.rc
4 |
--------------------------------------------------------------------------------
/DotCGSF/CGSFNET64Lib/SFNETMultiDispatcher.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/DotCGSF/CGSFNET64Lib/SFNETMultiDispatcher.cpp
--------------------------------------------------------------------------------
/EngineLayer/SFObject.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class SFObject
4 | {
5 | public:
6 | SFObject(void);
7 | virtual ~SFObject(void);
8 | };
9 |
--------------------------------------------------------------------------------
/DotCGSF/CGSFNET64Lib/ServerConnectReceiveCallback.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/DotCGSF/CGSFNET64Lib/ServerConnectReceiveCallback.h
--------------------------------------------------------------------------------
/EngineLayer/SFObject.cpp:
--------------------------------------------------------------------------------
1 | #include "SFObject.h"
2 |
3 | SFObject::SFObject(void)
4 | {
5 | }
6 |
7 | SFObject::~SFObject(void)
8 | {
9 | }
10 |
--------------------------------------------------------------------------------
/Sample/Common/tank_cppgen.bat:
--------------------------------------------------------------------------------
1 | set DST_DIR=../tankserver
2 | set SRC_DIR=.
3 | protoc -I=%SRC_DIR% --cpp_out=%DST_DIR% %SRC_DIR%/Tank.proto
4 | pause
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scene/CGSFClient.unity:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/Assets/Scene/CGSFClient.unity
--------------------------------------------------------------------------------
/EngineLayer/SFProtobufPacket.cpp:
--------------------------------------------------------------------------------
1 | #pragma warning(disable : 4244)
2 | #pragma warning(disable : 4267)
3 |
4 | #include "SFProtobufPacket.h"
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Sample/Common/Tank_csgen.bat:
--------------------------------------------------------------------------------
1 | "protobuf-net r668\ProtoGen\protogen.exe" -i:TankMessage.proto -o:D:\Dev\TankGame\Assets\Scripts\Network\Message.cs
2 | pause
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/ProtoGen/protogen.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/ProtoGen/protogen.exe
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/ProtoGen/protogen.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/ProtoGen/protogen.pdb
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/ProtoBuf/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/Assets/ProtoBuf/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/ProtoBuf/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/Assets/ProtoBuf/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/TagManager.asset
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/TimeManager.asset
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/sl4/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/sl4/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/sl4/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/sl4/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/wp8/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/wp8/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/wp8/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/wp8/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Precompile/precompile.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Precompile/precompile.exe
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Precompile/precompile.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Precompile/precompile.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/ProtoGen/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/ProtoGen/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/ProtoGen/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/ProtoGen/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/ProtoBuf/protobuf-net.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/Assets/ProtoBuf/protobuf-net.dll.mdb
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/AudioManager.asset
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/EditorSettings.asset
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/InputManager.asset
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/NavMeshAreas.asset
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/NetworkManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/NetworkManager.asset
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/cf20/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/cf20/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/cf20/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/cf20/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/cf35/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/cf35/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/cf35/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/cf35/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/mono/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/mono/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/net11/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/net11/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/net20/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/net20/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/net20/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/net20/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/net30/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/net30/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/net30/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/net30/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/unity/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/unity/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/unity/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/unity/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/wp71/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/wp71/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/wp71/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/wp71/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Precompile/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Precompile/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Precompile/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Precompile/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf_cppgen.bat:
--------------------------------------------------------------------------------
1 | set DST_DIR=../protobufserver
2 | set SRC_DIR=.
3 | protoc -I=%SRC_DIR% --cpp_out=%DST_DIR% %SRC_DIR%/samplemessage.proto
4 | pause
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/DynamicsManager.asset
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/GraphicsSettings.asset
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/ProjectSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/ProjectSettings.asset
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/QualitySettings.asset
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/UnityAdsSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/UnityAdsSettings.asset
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/cf20/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/cf20/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/cf20/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/cf20/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/cf35/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/cf35/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/cf35/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/cf35/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/ios/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/ios/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/ios/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/ios/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/mono/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/mono/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/sl4/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/sl4/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/sl4/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/sl4/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/wp71/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/wp71/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/wp71/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/wp71/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/wp8/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/wp8/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/wp8/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/wp8/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/portable/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/portable/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/portable/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/portable/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Precompile/IKVM.Reflection.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Precompile/IKVM.Reflection.dll
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/ClusterInputManager.asset
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/EditorBuildSettings.asset
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/Physics2DSettings.asset
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/net11/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/net11/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/net30/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/net30/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/net30/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/net30/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/netcore45/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/netcore45/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/netcore45/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/netcore45/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/Full/netcore45/protobuf-net.pri:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/Full/netcore45/protobuf-net.pri
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/ProtobufUnity/ProjectSettings/UnityConnectSettings.asset
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/netcore45/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/netcore45/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/netcore45/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/netcore45/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/netcore45/protobuf-net.pri:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/netcore45/protobuf-net.pri
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/portable/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/portable/protobuf-net.dll
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/CoreOnly/portable/protobuf-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdpdds/CGSFII/HEAD/Sample/Common/protobuf-net r668/CoreOnly/portable/protobuf-net.pdb
--------------------------------------------------------------------------------
/Sample/Common/protobuf_csgen.bat:
--------------------------------------------------------------------------------
1 | "protobuf-net r668\ProtoGen\protogen.exe" -i:SampleMessage.proto -o:../ProtobufUnity/Assets/Scripts/Network/SampleMessage.cs -p:observable
2 | pause
--------------------------------------------------------------------------------
/Sample/Common/protobuf-net r668/ProtoGen/protogen.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/DotCGSF/CGSFNET64Lib/Stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : 표준 포함 파일만 들어 있는 소스 파일입니다.
2 | // EngineLayerNET.pch는 미리 컴파일된 헤더가 됩니다.
3 | // stdafx.obj에는 미리 컴파일된 형식 정보가 포함됩니다.
4 |
5 | #include "stdafx.h"
6 |
--------------------------------------------------------------------------------
/BaseLayer/BaseLayer.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/DatabaseLayer/SFDBAdaptor.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "SFDBAdaptor.h"
3 |
4 |
5 | SFDBAdaptor::SFDBAdaptor(void)
6 | {
7 | }
8 |
9 |
10 | SFDBAdaptor::~SFDBAdaptor(void)
11 | {
12 | }
13 |
--------------------------------------------------------------------------------
/EngineLayer/EngineLayer.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Sample/Common/SampleMessage.proto:
--------------------------------------------------------------------------------
1 | package SAMPLE;
2 |
3 | enum ID
4 | {
5 | UNKNOWN = 0;
6 | HELLO = 1;
7 | }
8 |
9 | message Hello
10 | {
11 | required string message = 1;
12 | }
--------------------------------------------------------------------------------
/EngineLayer/CommonHeader.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "SFConstant.h"
3 | #include "../CGSFNet/EngineStructure.h"
4 | #include "../CGSFNet/BasePacket.h"
5 | #include "../CGSFNet/IEngine.h"
6 | #include "SFStructure.h"
--------------------------------------------------------------------------------
/EngineLayer/EngineLayerLinux.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/BaseLayer/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.2)
2 | project(BaseLayer)
3 |
4 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
5 |
6 | add_library (BaseLayer SFBitArray.cpp SFBitArray.h)
7 |
8 |
9 |
--------------------------------------------------------------------------------
/DotCGSF/CGSFNET64Lib/CgsfNET64Lib.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/EngineLayer/SFPacketProtocol.cpp:
--------------------------------------------------------------------------------
1 | #include "SFPacketProtocol.h"
2 | #include "SFEngine.h"
3 |
4 | void SendLogicLayer(BasePacket* pPacket)
5 | {
6 | SFEngine::GetInstance()->GetLogicDispatcher()->Dispatch(pPacket);
7 | }
--------------------------------------------------------------------------------
/Sample/EchoServer/EchoServreLinux.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/BaseLayer/base64.h:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #ifndef _BASE64_H_
4 | #define _BASE64_H_
5 |
6 | std::string base64_encode(unsigned char const* , unsigned int len);
7 | std::string base64_decode(std::string const& s);
8 |
9 | #endif
--------------------------------------------------------------------------------
/Bin/Debug/EngineConfig.xml:
--------------------------------------------------------------------------------
1 |
2 | CGSFNet.dll
3 | 127.0.0.1
4 | 25251
5 | 5000
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DotCGSF/EchoServerNet/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scene/CGSFClient.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 856f775f01178aa43969680f7bbab59d
3 | timeCreated: 1449020193
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/ProtoBuf/protobuf-net.pdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e108c3c73aa41ce4d9b4f070be173a6c
3 | timeCreated: 1434326102
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/ProtoBuf/protobuf-net.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 92599909d5a821c49b878b9c465aadac
3 | timeCreated: 1434326106
4 | licenseType: Free
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scripts/Network/UDP.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Assets.Scripts.Network
7 | {
8 | class UDP
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/DatabaseLayer/DBStruct.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | typedef struct tag_DBConnectionInfo
4 | {
5 | TCHAR szDataSource[100];
6 | TCHAR szDBName[100];
7 | TCHAR szUser[100];
8 | TCHAR szPassword[100];
9 | TCHAR IP[100];
10 | USHORT Port;
11 | }_DBConnectionInfo;
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/ProtoBuf/protobuf-net.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 58fbecced0402a7478bc4037d0260937
3 | timeCreated: 1449025466
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scene.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 39db305ea894bb54f8d4c65eda19b8ca
3 | folderAsset: yes
4 | timeCreated: 1449020193
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7d51fbf47a45f814eb32ddb05c38f18d
3 | folderAsset: yes
4 | timeCreated: 1449019240
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/EngineLayer/SFObserver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class SFObject;
4 | class SFMessage;
5 |
6 | class SFObserver
7 | {
8 | public:
9 | SFObserver(void);
10 | virtual ~SFObserver(void);
11 |
12 | virtual bool OnMessage(SFObject* pSender, SFMessage* pMessage);
13 | };
14 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/ProtoBuf.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a8196c1e647e9b14cab7d276d8014ac4
3 | folderAsset: yes
4 | timeCreated: 1449025309
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Sample/EchoServer/EchoServerHeader.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifdef _WIN32
3 | #include
4 | #endif
5 |
6 | #include "../EngineLayer/SFEngine.h"
7 |
8 | #ifdef _WIN32
9 | #pragma comment(lib, "EngineLayer.lib")
10 | //#pragma comment(lib, "DatabaseLayer.lib")
11 | #endif
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scripts/Common.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f4db8fab7fd118542a21c01701233552
3 | folderAsset: yes
4 | timeCreated: 1449020917
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scripts/Network.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9542b7b7a01cbcc48bb37185aafc41e9
3 | folderAsset: yes
4 | timeCreated: 1449020917
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scripts/Network/INetworkInterface.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Assets.Scripts.Network
7 | {
8 | class INetworkInterface
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/EngineLayer/SFProducer.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | typedef ACE_Atomic_Op SafeInt;
4 | enum
5 | {
6 | MAX_ITEM_COUNT = 1000,
7 | };
8 |
9 |
10 | class SFProducer
11 | {
12 | public:
13 | SFProducer(void){}
14 | virtual ~SFProducer(void){}
15 | };
16 |
--------------------------------------------------------------------------------
/EngineLayer/SFCheckSum.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class SFChecksum
4 | {
5 | public:
6 | static DWORD FromBuffer(BYTE* buffer, size_t size, DWORD &dwCrc32);
7 | static DWORD FromFileWin32(LPCWSTR filename, DWORD &dwCrc32);
8 | static DWORD FromFileFilemap(LPCWSTR filename, DWORD &dwCrc32);
9 | };
10 |
--------------------------------------------------------------------------------
/BaseLayer/SFConsumer.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | typedef ACE_Atomic_Op SafeInt;
4 |
5 |
6 | class SFConsumer: public ACE_Task_Base
7 | {
8 |
9 |
10 | public:
11 | SFConsumer(void){}
12 | virtual ~SFConsumer(void){}
13 |
14 | protected:
15 |
16 | private:
17 | };
18 |
--------------------------------------------------------------------------------
/CGSFNet/WorkerThread.cpp:
--------------------------------------------------------------------------------
1 | #include "WorkerThread.h"
2 | #include "ACEHeader.h"
3 |
4 | void ProactorWorkerThread(void* Args)
5 | {
6 | ACE_Proactor::instance()->proactor_run_event_loop();
7 | }
8 |
9 | void ReactorWorkerThread(void* Args)
10 | {
11 | ACE_Reactor::instance()->run_reactor_event_loop();
12 | }
--------------------------------------------------------------------------------
/EngineLayer/SFObserver.cpp:
--------------------------------------------------------------------------------
1 | #include "SFObserver.h"
2 |
3 | #pragma warning (disable : 4100)
4 |
5 |
6 | SFObserver::SFObserver(void)
7 | {
8 | }
9 |
10 | SFObserver::~SFObserver(void)
11 | {
12 | }
13 |
14 | bool SFObserver::OnMessage( SFObject* pSender, SFMessage* pMessage )
15 | {
16 | return true;
17 | }
--------------------------------------------------------------------------------
/DotCGSF/EchoServerNet/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Bin/Release/EngineConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/DatabaseLayer/IDBManager.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class SFDBWorker;
4 | class ACE_Method_Request;
5 |
6 | class IDBManager
7 | {
8 | public:
9 | IDBManager(void){}
10 | virtual ~IDBManager(void){}
11 |
12 | virtual int return_to_work(SFDBWorker* pWorker, ACE_Method_Request* pReq) = 0;
13 | virtual bool done() = 0;
14 | };
15 |
--------------------------------------------------------------------------------
/EngineLayer/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // ServerEngine.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
7 | // TODO: reference any additional headers you need in STDAFX.H
8 | // and not in this file
--------------------------------------------------------------------------------
/Sample/TankServer/TankProtocol.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "SFProtobufProtocol.h"
3 |
4 | class TankProtocol : public SFProtobufProtocol
5 | {
6 | public:
7 | TankProtocol();
8 | virtual ~TankProtocol();
9 |
10 | BasePacket* CreateIncomingPacketFromPacketId(int packetId, int channel) override;
11 | };
12 |
13 |
--------------------------------------------------------------------------------
/CGSFNet/PeerInfo.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | typedef struct tag_PeerInfo
4 | {
5 | DWORD LocalIP;
6 | USHORT LocalPort;
7 |
8 | DWORD ExternalIP;
9 | USHORT ExternalPort;
10 |
11 | tag_PeerInfo()
12 | {
13 | LocalIP = 0;
14 | LocalPort = 0;
15 |
16 | ExternalIP = 0;
17 | ExternalPort = 0;
18 |
19 | }
20 |
21 | }_PeerInfo;
--------------------------------------------------------------------------------
/DatabaseLayer/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // DatabaseLayer.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
7 | // TODO: reference any additional headers you need in STDAFX.H
8 | // and not in this file
9 |
--------------------------------------------------------------------------------
/Sample/ServerConnector/AuthServerCallback.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "INetworkCallback.h"
3 |
4 | class AuthServerCallback : public INetworkCallback
5 | {
6 | public:
7 | AuthServerCallback();
8 | virtual ~AuthServerCallback();
9 |
10 | virtual bool HandleNetworkMessage(BasePacket* pPacket) override;
11 | };
12 |
13 |
--------------------------------------------------------------------------------
/DatabaseLayer/targetver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Including SDKDDKVer.h defines the highest available Windows platform.
4 |
5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
7 |
8 | #include
9 |
--------------------------------------------------------------------------------
/Sample/ProtoBufServer/ProtoBufProtocol.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "SFProtobufProtocol.h"
3 |
4 | class ProtoBufProtocol : public SFProtobufProtocol
5 | {
6 | public:
7 | ProtoBufProtocol();
8 | virtual ~ProtoBufProtocol();
9 |
10 | BasePacket* CreateIncomingPacketFromPacketId(int packetId, int channel) override;
11 | };
12 |
13 |
--------------------------------------------------------------------------------
/Sample/ServerConnector/DatabaseServerCallback.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "InetworkCallback.h"
3 |
4 | class DatabaseServerCallback : public INetworkCallback
5 | {
6 | public:
7 | DatabaseServerCallback();
8 | virtual ~DatabaseServerCallback();
9 |
10 | virtual bool HandleNetworkMessage(BasePacket* pPacket) override;
11 | };
12 |
13 |
--------------------------------------------------------------------------------
/DatabaseLayer/SFDatabaseProxyRemote.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | template
4 | class SFDatabaseProxyRemote : public SFDatabaseProxy
5 | {
6 | public:
7 | SFDatabaseProxyRemote(void){}
8 | virtual ~SFDatabaseProxyRemote(void){}
9 |
10 | //virtual BOOL Initialize() override;
11 | //virtual BOOL SendDBRequest(T* pMessage) override;
12 | };
13 |
--------------------------------------------------------------------------------
/Bin/Debug/ServerConnection.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 127.0.0.1
4 | 10000
5 | 10000
6 | GAME DATABASE SERVER
7 |
8 |
9 | 127.0.0.1
10 | 10001
11 | 9000
12 | AUTH SERVER
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Bin/Release/ServerConnection.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 127.0.0.1
4 | 10000
5 | 10000
6 | GAME DATABASE SERVER
7 |
8 |
9 | 127.0.0.1
10 | 10001
11 | 9000
12 | AUTH SERVER
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scripts/UIRoot.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b27358d114e98bb458cebb1b878a5e94
3 | timeCreated: 1449198003
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Sample/ServerConnector/AuthServerCallback.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "AuthServerCallback.h"
3 |
4 |
5 | AuthServerCallback::AuthServerCallback()
6 | {
7 | }
8 |
9 |
10 | AuthServerCallback::~AuthServerCallback()
11 | {
12 | }
13 |
14 | bool AuthServerCallback::HandleNetworkMessage(BasePacket* pPacket)
15 | {
16 | return true;
17 | }
--------------------------------------------------------------------------------
/CGSFNet/IServerCallback.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class BasePacket;
4 |
5 | class IServerCallback
6 | {
7 | public:
8 | IServerCallback(void){m_isConnected = false; m_Serial = -1;}
9 | virtual ~IServerCallback(void){}
10 |
11 | virtual bool HandleServerMessage(int serverId, BasePacket* pPacket) = 0;
12 |
13 | protected:
14 |
15 | private:
16 |
17 | };
18 |
19 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scripts/Network/UDP.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dc0aa15b1bb56d34ca5f509978701884
3 | timeCreated: 1449021334
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scripts/Common/Singleton.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cb9efe72b1c99484893b6c78d6b14921
3 | timeCreated: 1449020502
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scripts/Network/TCPNetwork.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fd99f8138adf13e4da4bf0b0c1cc7184
3 | timeCreated: 1449021334
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/BaseLayer/SFCompressZLib.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class SFCompressZLib
4 | {
5 | public:
6 | SFCompressZLib(void);
7 | virtual ~SFCompressZLib(void);
8 |
9 | bool Compress(char* pDest, int& destLen, unsigned char* pSrc, int srcLen);
10 | bool Uncompress(unsigned char* pDest, int& destLen, unsigned char* pSrc, int srcLen);
11 |
12 | protected:
13 |
14 | private:
15 | };
16 |
--------------------------------------------------------------------------------
/BaseLayer/SFCompressor.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | template
4 | class SFCompressor
5 | {
6 | public:
7 | SFCompressor(void){}
8 | virtual ~SFCompressor(void){}
9 |
10 | static T* GetCompressor(){return &m_Compress;}
11 |
12 | protected:
13 |
14 | private:
15 | static T m_Compress;
16 | };
17 |
18 | template
19 | T SFCompressor::m_Compress;
20 |
21 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scripts/Network/CGSFNetProtocol.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 95dcdcad97fd2014baddbba109bd5fc2
3 | timeCreated: 1449136050
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scripts/Network/INetworkInterface.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 39dfe29d002ff9641b11bd0bd29d34fc
3 | timeCreated: 1449021334
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scripts/Network/NetworkController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dd919a387ae56cc4aab2ab3d468dd7e5
3 | timeCreated: 1449019440
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/Scripts/Network/SampleMessage.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5a5638055aa510c4dacca47c6e72aa72
3 | timeCreated: 1449025311
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/BaseLayer/SFEncryptionXOR.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class SFEncryptionXOR
4 | {
5 | public:
6 | SFEncryptionXOR();
7 | virtual ~SFEncryptionXOR();
8 |
9 | static bool Encrypt(unsigned char* pSrc, unsigned int Length);
10 | static bool Decrypt(unsigned char* pSrc, unsigned int Length);
11 |
12 | protected:
13 |
14 | private:
15 | static unsigned int m_EncrytionKey;
16 | };
17 |
--------------------------------------------------------------------------------
/BaseLayer/BaseCommonHeader.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
3 |
4 |
5 |
6 | // TODO: reference additional headers your program requires here
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 |
14 | #include "Macro.h"
--------------------------------------------------------------------------------
/EngineLayer/SFPacketPool.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "SFPacket.h"
3 | #include "../BaseLayer/SFObjectPool.h"
4 |
5 | class SFPacketPool : public SFObjectPool
6 | {
7 | public:
8 | SFPacketPool();
9 | virtual ~SFPacketPool();
10 |
11 | static SFPacketPool* GetInstance();
12 |
13 | private:
14 | static SFPacketPool* m_pPacketPool;
15 |
16 | };
17 |
18 |
--------------------------------------------------------------------------------
/BaseLayer/BaseLayerLinux.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | export DISPLAY=:0.0
5 | LinuxDebugger
6 |
7 |
--------------------------------------------------------------------------------
/Sample/ServerConnector/DatabaseServerCallback.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "DatabaseServerCallback.h"
3 |
4 |
5 | DatabaseServerCallback::DatabaseServerCallback()
6 | {
7 | }
8 |
9 |
10 | DatabaseServerCallback::~DatabaseServerCallback()
11 | {
12 | }
13 |
14 | bool DatabaseServerCallback::HandleNetworkMessage(BasePacket* pPacket)
15 | {
16 | return true;
17 | }
18 |
--------------------------------------------------------------------------------
/DatabaseLayer/SFDatabaseSQLite.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "SFDatabase.h"
3 |
4 | class CppSQLite3DB;
5 |
6 | class SFDatabaseSQLite : public SFDatabase
7 | {
8 | public:
9 | SFDatabaseSQLite(void);
10 | virtual ~SFDatabaseSQLite(void);
11 |
12 | virtual BOOL Initialize() override;
13 |
14 | BOOL Execute(char* szQuery);
15 |
16 | protected:
17 |
18 | private:
19 | //CppSQLite3DB* m_pDatabase;
20 | };
--------------------------------------------------------------------------------
/CGSFNet/InterlockedValue.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class InterlockedValue
4 | {
5 | public:
6 | InterlockedValue();
7 | InterlockedValue(long initialValue);
8 | ~InterlockedValue() {};
9 | bool Acquire();
10 | void Release();
11 |
12 | public:
13 | bool CompareExchange(long exchange, long comparand);
14 | void Exchange(long exchange);
15 | bool Compare(long comparand);
16 |
17 | private:
18 | long _value;
19 | };
--------------------------------------------------------------------------------
/DatabaseLayer/SFMSSQLAdaptor.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "SFDBAdaptor.h"
3 | #include "SFMSSQL.h"
4 |
5 | class SFMSSQLAdaptor : public SFDBAdaptor
6 | {
7 | public:
8 | SFMSSQLAdaptor(void);
9 | virtual ~SFMSSQLAdaptor(void);
10 |
11 | SFMSSQL* GetObject(){return m_pMSSql;}
12 |
13 | protected:
14 | virtual bool Initialize(_DBConnectionInfo* pInfo) override;
15 |
16 | private:
17 | SFMSSQL* m_pMSSql;
18 | };
--------------------------------------------------------------------------------
/DatabaseLayer/SFZdb.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 | #include "zdb.h"
8 | #ifdef __cplusplus
9 | }
10 | #endif
11 |
12 | class SFZdb
13 | {
14 | public:
15 | SFZdb();
16 | ~SFZdb();
17 |
18 | BOOL Initialize(_DBConnectionInfo* pInfo);
19 | BOOL Execute(char* szQuery);
20 |
21 | URL_T url;
22 | ConnectionPool_T pool;
23 | };
--------------------------------------------------------------------------------
/DatabaseLayer/SFZdbAdpator.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "SFDBAdaptor.h"
3 |
4 | class SFZdb;
5 |
6 | class SFZdbAdpator : public SFDBAdaptor
7 | {
8 | public:
9 | SFZdbAdpator();
10 | virtual ~SFZdbAdpator();
11 |
12 | SFZdb* GetObject(){ return m_pZdb; }
13 |
14 | protected:
15 | virtual bool Initialize(_DBConnectionInfo* pInfo) override;
16 |
17 | private:
18 | SFZdb* m_pZdb;
19 | };
20 |
21 |
--------------------------------------------------------------------------------
/Sample/TankServer/TankLogicEntry.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "ILogicEntry.h"
3 |
4 | class TankLogicEntry : public ILogicEntry
5 | {
6 | public:
7 | TankLogicEntry();
8 | virtual ~TankLogicEntry();
9 |
10 | virtual bool Initialize() override;
11 | virtual bool ProcessPacket(BasePacket* pBasePacket) override;
12 | virtual ILogicEntry* Clone()
13 | {
14 | return new TankLogicEntry();
15 | }
16 | };
17 |
18 |
--------------------------------------------------------------------------------
/DatabaseLayer/SFFastDBAdaptor.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "SFDBAdaptor.h"
3 | #include "SFFastDB.h"
4 |
5 | class SFFastDBAdaptor : public SFDBAdaptor
6 | {
7 | public:
8 | SFFastDBAdaptor(void);
9 | virtual ~SFFastDBAdaptor(void);
10 |
11 | SFFastDB* GetObject(){return m_pFastDB;}
12 |
13 | protected:
14 | virtual BOOL Initialize(_DBConnectionInfo* pInfo) override;
15 |
16 | private:
17 | SFFastDB* m_pFastDB;
18 |
19 | };
20 |
21 |
--------------------------------------------------------------------------------
/EngineLayer/SFPacketIOBuffer.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "SFIOBuffer.h"
3 | #include "SFStructure.h"
4 | class SFPacket;
5 |
6 | class SFPacketIOBuffer : public SFIOBuffer
7 | {
8 |
9 | public:
10 | SFPacketIOBuffer(void);
11 | virtual ~SFPacketIOBuffer(void);
12 |
13 | bool GetPacket(SFPacketHeader& header, char* pBuffer, unsigned short packetSize, int& errorCode);
14 | bool GetHeader(SFPacketHeader& header, int& errorCode);
15 | };
16 |
--------------------------------------------------------------------------------
/Sample/ServerListener/ServerListenerLogicEntry.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "ILogicEntry.h"
3 |
4 | class BasePacket;
5 |
6 | class ServerListenerLogicEntry : public ILogicEntry
7 | {
8 | public:
9 | ServerListenerLogicEntry(void);
10 | virtual ~ServerListenerLogicEntry(void);
11 |
12 | virtual bool Initialize() override;
13 | virtual bool ProcessPacket(BasePacket* pBasePacket) override;
14 | virtual ILogicEntry* Clone() override;
15 | };
--------------------------------------------------------------------------------
/Sample/TankServer/TankServer.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(SolutionDir)/Bin64/Debug
5 | WindowsLocalDebugger
6 |
7 |
--------------------------------------------------------------------------------
/Sample/ProtoBufServer/ProtoBufServer.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(SolutionDir)Bin64/Debug
5 | WindowsLocalDebugger
6 |
7 |
--------------------------------------------------------------------------------
/Sample/ProtoBufServer/TankServer.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(SolutionDir)/Bin64/Debug
5 | WindowsLocalDebugger
6 |
7 |
--------------------------------------------------------------------------------
/Sample/ServerListener/ServerListener.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(SolutionDir)/Bin64/Debug
5 | WindowsLocalDebugger
6 |
7 |
--------------------------------------------------------------------------------
/EngineLayer/SFClassicDispatcher.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "SFLogicDispatcher.h"
3 |
4 | class SFClassicDispatcher : public SFLogicDispatcher
5 | {
6 | public:
7 | SFClassicDispatcher();
8 | virtual ~SFClassicDispatcher();
9 |
10 | virtual void Dispatch(BasePacket* pPacket) override;
11 |
12 | virtual bool CreateLogicSystem(ILogicEntry* pLogicEntry) override;
13 | virtual bool ShutDownLogicSystem() override;
14 | };
15 |
16 |
--------------------------------------------------------------------------------
/Sample/ProtoBufServer/ProtoBufLogicEntry.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "ILogicEntry.h"
3 |
4 | class ProtoBufLogicEntry : public ILogicEntry
5 | {
6 | public:
7 | ProtoBufLogicEntry();
8 | virtual ~ProtoBufLogicEntry();
9 |
10 | virtual bool Initialize() override;
11 | virtual bool ProcessPacket(BasePacket* pBasePacket) override;
12 | virtual ILogicEntry* Clone()
13 | {
14 | return new ProtoBufLogicEntry();
15 | }
16 | };
17 |
18 |
--------------------------------------------------------------------------------
/DotCGSF/CGSFNET64Common/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DotCGSF/CGSFNET64Lib/Stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : 자주 사용하지만 자주 변경되지는 않는
2 | // 표준 시스템 포함 파일 및 프로젝트 관련 포함 파일이
3 | // 들어 있는 포함 파일입니다.
4 |
5 | #pragma once
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | #include
12 | #include "CommonHeader.h"
13 | #include "SFEngine.h"
14 |
15 | #define GOOGLE_GLOG_DLL_DECL
16 | #define GLOG_NO_ABBREVIATED_SEVERITIES
17 | #include "glog/logging.h"
18 |
19 | #include "Helper.h"
--------------------------------------------------------------------------------
/EngineLayer/SFBasePacketProtocol.cpp:
--------------------------------------------------------------------------------
1 | #include "SFBasePacketProtocol.h"
2 |
3 |
4 | SFBasePacketProtocol::SFBasePacketProtocol()
5 | {
6 | }
7 |
8 |
9 | SFBasePacketProtocol::~SFBasePacketProtocol()
10 | {
11 | }
12 |
13 | void SFBasePacketProtocol::CopyBaseProtocol(SFBasePacketProtocol& source)
14 | {
15 | m_ioSize = source.GetIOSize();
16 | m_packetSize = source.GetPacketSize();
17 | m_packetOption = source.GetPacketOption();
18 | }
19 |
--------------------------------------------------------------------------------
/EngineLayer/SFPacketPool.cpp:
--------------------------------------------------------------------------------
1 | #include "EngineLayerHeader.h"
2 | #include "SFPacketPool.h"
3 |
4 | SFPacketPool* SFPacketPool::m_pPacketPool = nullptr;
5 |
6 | SFPacketPool::SFPacketPool()
7 | {
8 | }
9 |
10 |
11 | SFPacketPool::~SFPacketPool()
12 | {
13 | }
14 |
15 | SFPacketPool* SFPacketPool::GetInstance()
16 | {
17 | if (m_pPacketPool == nullptr)
18 | m_pPacketPool = new SFPacketPool();
19 |
20 | return m_pPacketPool;
21 | }
22 |
--------------------------------------------------------------------------------
/Sample/ServerConnector/ServerConnectorLogicEntry.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "ILogicEntry.h"
3 |
4 | class BasePacket;
5 |
6 | class ServerConnectorLogicEntry : public ILogicEntry
7 | {
8 | public:
9 | ServerConnectorLogicEntry(void);
10 | virtual ~ServerConnectorLogicEntry(void);
11 |
12 | virtual bool Initialize() override;
13 | virtual bool ProcessPacket(BasePacket* pBasePacket) override;
14 | virtual ILogicEntry* Clone() override;
15 | };
16 |
17 |
--------------------------------------------------------------------------------
/Sample/EchoServer/EchoLogicEntry.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "../EngineLayer/ILogicEntry.h"
3 |
4 | class BasePacket;
5 |
6 | class EchoLogicEntry : public ILogicEntry
7 | {
8 | public:
9 | EchoLogicEntry(void);
10 | virtual ~EchoLogicEntry(void);
11 |
12 | virtual bool Initialize() override;
13 | virtual bool ProcessPacket(BasePacket* pBasePacket) override;
14 | virtual ILogicEntry* Clone() override;
15 |
16 | private:
17 | int m_timerCount;
18 | };
19 |
20 |
--------------------------------------------------------------------------------
/BaseLayer/Macro.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | #define LOKI_WINDOWS_H
5 |
6 | #define SFASSERT(x) assert((x))
7 |
8 | #ifndef TRACE
9 | #define TRACE
10 | #endif
11 |
12 |
13 | #ifndef ASSERT
14 | #define ASSERT(exp) SFASSERT(exp)
15 | #endif
16 |
17 | #ifndef ASSERT_VALID
18 | #define ASSERT_VALID(pOb)
19 | #endif
20 |
21 | #ifndef VERIFY
22 | #ifdef _DEBUG
23 | #define VERIFY(exp) SFASSERT(exp)
24 | #else
25 | #define VERIFY(exp) exp
26 | #endif
27 | #endif
--------------------------------------------------------------------------------
/CGSFNet/ACEHeader.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #pragma warning(disable : 4996)
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
--------------------------------------------------------------------------------
/DatabaseLayer/SFZdbAdpator.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "SFZdbAdpator.h"
3 | #include "SFZdb.h"
4 |
5 | SFZdbAdpator::SFZdbAdpator(void)
6 | : m_pZdb(NULL)
7 | {
8 |
9 | }
10 |
11 |
12 | SFZdbAdpator::~SFZdbAdpator(void)
13 | {
14 | if (m_pZdb)
15 | delete m_pZdb;
16 | }
17 |
18 | bool SFZdbAdpator::Initialize(_DBConnectionInfo* pInfo)
19 | {
20 | m_pZdb = new SFZdb();
21 |
22 | if (FALSE == m_pZdb->Initialize(pInfo))
23 | return FALSE;
24 |
25 | return RegisterDBService();
26 | }
--------------------------------------------------------------------------------
/EngineLayer/SFSessionService.cpp:
--------------------------------------------------------------------------------
1 | #include "EngineLayerHeader.h"
2 | #include "SFSessionService.h"
3 |
4 | bool SFSessionService::OnReceive(char* pData, unsigned short Length, _SessionDesc& desc)
5 | {
6 | return m_pPacketProtocol->OnReceive(m_serial, pData, Length, desc);
7 | }
8 |
9 | /*bool SFSessionService::SendRequest(ISession* pSession, BasePacket* pPacket)
10 | {
11 | if(TRUE == m_pPacketProtocol->SendRequest(pSession, pPacket))
12 | {
13 | return true;
14 | }
15 |
16 | return false;
17 | }*/
--------------------------------------------------------------------------------
/EngineLayer/SFIOCPFramework.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "INetworkFramework.h"
3 |
4 | class ILogicEntry;
5 |
6 | class SFIOCPFramework : public INetworkFramework
7 | {
8 | public:
9 | SFIOCPFramework(void);
10 | virtual ~SFIOCPFramework(void);
11 |
12 | virtual BOOL Initialize(eNetworkFrameworkType Type) override;
13 | virtual BOOL Start(ILogicEntry* pLogic) override;
14 | virtual BOOL End() override;
15 | virtual BOOL Finally() override;
16 |
17 | static char* GetModuleName(){return "IOCP";}
18 | };
19 |
--------------------------------------------------------------------------------
/BaseLayer/SFRegexChecker.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef TCHAR
4 | #define TCHAR wchar_t
5 | #endif
6 |
7 | class SFRegexChecker
8 | {
9 | public:
10 | SFRegexChecker(void);
11 | virtual ~SFRegexChecker(void);
12 |
13 | bool IsValidCharName(TCHAR* szStr);
14 | bool IsValidResidentRegistrationNumber(TCHAR* szStr);
15 | bool IsValidURL(TCHAR* szStr);
16 | bool IsValidMacAddress(TCHAR* szStr);
17 | bool IsValidEMail(TCHAR* szStr);
18 | bool IsValidIPAddress( TCHAR* szStr );
19 | protected:
20 |
21 | private:
22 | };
23 |
--------------------------------------------------------------------------------
/CGSFNet/EngineStructure.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | enum class SESSION_TYPE : int
5 | {
6 | SESSION_UNKNOWN = -1,
7 | SESSION_LISTENER = 0,
8 | SESSION_CONNECTOR = 1,
9 | };
10 |
11 | typedef struct tag_SessionDesc
12 | {
13 | SESSION_TYPE sessionType;
14 | int identifier;
15 | std::string szIP;
16 | unsigned short port;
17 |
18 | tag_SessionDesc()
19 | {
20 | sessionType = SESSION_TYPE::SESSION_UNKNOWN;
21 | identifier = -1;
22 | port = 0;
23 | }
24 |
25 | }_SessionDesc;
--------------------------------------------------------------------------------
/DatabaseLayer/SFFastDBAdaptor.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "SFFastDBAdaptor.h"
3 |
4 |
5 | SFFastDBAdaptor::SFFastDBAdaptor(void)
6 | : m_pFastDB(NULL)
7 | {
8 | }
9 |
10 |
11 | SFFastDBAdaptor::~SFFastDBAdaptor(void)
12 | {
13 | if(m_pFastDB)
14 | delete m_pFastDB;
15 | }
16 |
17 | BOOL SFFastDBAdaptor::Initialize(_DBConnectionInfo* pInfo)
18 | {
19 | m_pFastDB = new SFFastDB();
20 |
21 | if(FALSE == m_pFastDB->Initialize(pInfo->szDataSource))
22 | return FALSE;
23 |
24 | return RegisterDBService();
25 | }
--------------------------------------------------------------------------------
/Sample/ProtobufUnity/Assets/ProtoBuf/protobuf-net.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 97eef576ea2f83449a82de04a0bb64d2
3 | timeCreated: 1434326106
4 | licenseType: Free
5 | PluginImporter:
6 | serializedVersion: 1
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | platformData:
11 | Any:
12 | enabled: 1
13 | settings: {}
14 | Editor:
15 | enabled: 0
16 | settings:
17 | DefaultValueInitialized: true
18 | userData:
19 | assetBundleName:
20 | assetBundleVariant:
21 |
--------------------------------------------------------------------------------
/EngineLayer/SFIOCPFramework.cpp:
--------------------------------------------------------------------------------
1 | #include "StdAfx.h"
2 | #include "SFIOCPFramework.h"
3 |
4 | SFIOCPFramework::SFIOCPFramework(void)
5 | {
6 | }
7 |
8 | SFIOCPFramework::~SFIOCPFramework(void)
9 | {
10 | }
11 |
12 | bool SFIOCPFramework::Initialize(eNetworkFrameworkType Type)
13 | {
14 | return true;
15 | }
16 |
17 | bool SFIOCPFramework::Start(ILogicEntry* pLogic)
18 | {
19 | return true;
20 | }
21 |
22 | bool SFIOCPFramework::End()
23 | {
24 | return true;
25 | }
26 |
27 | bool SFIOCPFramework::Finally()
28 | {
29 | return true;
30 | }
--------------------------------------------------------------------------------
/EngineLayer/LogicEntry.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "ILogicEntry.h"
3 |
4 | class LogicEntry
5 | {
6 | public:
7 | LogicEntry(void);
8 | virtual ~LogicEntry(void);
9 |
10 | bool Initialize();
11 | bool ProcessPacket(BasePacket* pPacket);
12 |
13 | bool DestroyLogic();
14 | bool Destroy();
15 |
16 | void SetLogic(ILogicEntry* pLogic)
17 | {
18 | m_pLogicEntry = pLogic;
19 | }
20 |
21 | static LogicEntry* GetInstance();
22 |
23 | protected:
24 |
25 | private:
26 | static LogicEntry* m_pLogic;
27 | ILogicEntry* m_pLogicEntry;
28 | };
29 |
--------------------------------------------------------------------------------
/EngineLayer/SFBasePacketProtocol.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class SFBasePacketProtocol
4 | {
5 | public:
6 | SFBasePacketProtocol();
7 | virtual ~SFBasePacketProtocol();
8 |
9 | inline int GetIOSize() { return m_ioSize; }
10 | inline unsigned short GetPacketSize() { return m_packetSize; }
11 | inline int GetPacketOption() { return m_packetOption; }
12 |
13 | void CopyBaseProtocol(SFBasePacketProtocol& source);
14 |
15 | protected:
16 | int m_ioSize;
17 | unsigned short m_packetSize;
18 | int m_packetOption;
19 | };
20 |
21 |
--------------------------------------------------------------------------------
/BaseLayer/SFFastCRC.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class SFFastCRC
4 | {
5 | public:
6 | SFFastCRC(void);
7 | virtual ~SFFastCRC(void);
8 |
9 | bool Initialize();
10 | bool GetCRC(const unsigned char* pBuffer, unsigned int BufferSize, unsigned int& CRC);
11 | bool GetSimpleCRC(const char* pBuffer, unsigned int BufferSize, unsigned int& CRC);
12 | bool GetZLibCRC(const unsigned char* pBuffer, unsigned int BufferSize, unsigned int& CRC);
13 | bool GetadlerCRC(const unsigned char* pBuffer, unsigned int BufferSize, unsigned int& CRC);
14 | };
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/EngineLayer/SFSessionService.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "../CGSFNet/ISessionService.h"
3 | #include "../CGSFNet/IPacketProtocol.h"
4 |
5 | class SFSessionService : public ISessionService
6 | {
7 | public:
8 | SFSessionService(IPacketProtocol* pProtocol) : ISessionService(pProtocol){}
9 | virtual ~SFSessionService(void){}
10 |
11 | virtual bool OnReceive(char* pData, unsigned short Length, _SessionDesc& desc) override;
12 | //virtual bool SendRequest(ISession *pSession, BasePacket* pPacket) override;
13 |
14 | protected:
15 |
16 | private:
17 |
18 | };
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CGSFII
2 | CGSF Second Edition
3 | # Setting
4 | Compiler : Visual Studio 2019
5 |
6 | Download Binary
7 | * [CGSF External] (https://drive.google.com/file/d/0B4zZS0o3dor0M3I0TkdoQUZrWlU/view?usp=sharing)
8 | * Extract ThirdParty.rar to CGSF folder
9 | * [Boost Library 1.69] (http://www.boost.org/users/history/version_1_69_0.html)
10 | * [Google Protocol Buffer] (https://github.com/google/protobuf)
11 | * [Google Log] (https://github.com/google/glog)
12 | * [ACE 6.33] (http://download.dre.vanderbilt.edu/)
13 | * [ZLib 1.28] (http://www.zlib.net/)
14 |
--------------------------------------------------------------------------------
/DotCGSF/CGSFNET64Common/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/DatabaseLayer/SFMSSQLAdaptor.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "SFMSSQLAdaptor.h"
3 | #include "SFMSSQL.h"
4 |
5 | SFMSSQLAdaptor::SFMSSQLAdaptor(void)
6 | : m_pMSSql(NULL)
7 | {
8 | }
9 |
10 |
11 | SFMSSQLAdaptor::~SFMSSQLAdaptor(void)
12 | {
13 | if(m_pMSSql)
14 | delete m_pMSSql;
15 | }
16 |
17 | bool SFMSSQLAdaptor::Initialize(_DBConnectionInfo* pInfo)
18 | {
19 | m_pMSSql = new SFMSSQL();
20 |
21 | if (FALSE == m_pMSSql->Initialize(pInfo))
22 | {
23 | printf("MSSql Initialize Fail!!\n");
24 | return FALSE;
25 | }
26 |
27 | return RegisterDBService();
28 | }
29 |
--------------------------------------------------------------------------------
/EngineLayer/SFACEAllocator.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | typedef ACE_Dynamic_Cached_Allocator ACEAllocator;
5 |
6 | template
7 | class AceMemoryObject
8 | {
9 |
10 | public:
11 | static void* operator new(size_t size)
12 | {
13 | return AceMemoryPool->malloc(size);
14 | }
15 |
16 | static void operator delete(void* p)
17 | {
18 | AceMemoryPool->free(p);
19 | }
20 |
21 | static ACEAllocator* AceMemoryPool;
22 | };
23 |
24 | template
25 | ACEAllocator* AceMemoryObject::AceMemoryPool = new ACEAllocator(1000, sizeof(T));
--------------------------------------------------------------------------------
/EngineLayer/SFExcel.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #import "C:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename("EOF", "adoEOF") rename("BOF", "adoBOF")
3 |
4 | class SFExcel
5 | {
6 | public:
7 | SFExcel(void);
8 | virtual ~SFExcel(void);
9 |
10 | BOOL Initialize();
11 | BOOL Finally();
12 |
13 | BOOL Read( char* szFileName, int SheetIndex );
14 | std::string MakeConnectionString(std::string filename);
15 | std::string MakeSelectedSheet(_bstr_t ConnectionString, int sheetIndex);
16 | void Write(std::string filename);
17 |
18 |
19 | protected:
20 |
21 | private:
22 | };
--------------------------------------------------------------------------------
/EngineLayer/SFJsonPacket.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "EngineLayerHeader.h"
3 | #include "JsonNode.h"
4 |
5 | class SFJsonPacket : public BasePacket
6 | {
7 | friend class SFJsonProtocol;
8 |
9 | public:
10 | SFJsonPacket(USHORT usPacketId);
11 | virtual ~SFJsonPacket(void);
12 |
13 | JsonObjectNode& GetData(){return m_Node;}
14 | SFPacketHeader* GetHeader() { return &m_packetHeader; }
15 | virtual void Release() override;
16 |
17 | virtual BasePacket* Clone() override;
18 |
19 | protected:
20 |
21 | private:
22 | SFJsonPacket();
23 |
24 | SFPacketHeader m_packetHeader;
25 | JsonObjectNode m_Node;
26 | };
--------------------------------------------------------------------------------
/CGSFNet/IPacketProtocol.h:
--------------------------------------------------------------------------------
1 | #ifndef _IPACKETPROTOCOL_H
2 | #define _IPACKETPROTOCOL_H
3 |
4 | class ISession;
5 | class BasePacket;
6 |
7 | class IPacketProtocol
8 | {
9 | public:
10 | IPacketProtocol(){}
11 | virtual ~IPacketProtocol() {}
12 |
13 | virtual bool OnReceive(int Serial, char* pBuffer, unsigned int dwTransferred, _SessionDesc& pDesc) = 0;
14 | virtual bool Encode(BasePacket* pPacket, char** ppBuffer, int& bufferSize) = 0;
15 | //virtual BasePacket* CreatePacket() = 0;
16 |
17 | virtual bool DisposePacket(BasePacket* pPacket) = 0;
18 |
19 | virtual IPacketProtocol* Clone() = 0;
20 | };
21 |
22 | #endif
--------------------------------------------------------------------------------
/EngineLayer/ILogicDispatcher.h:
--------------------------------------------------------------------------------
1 | #ifndef _ILOGICDISPATCHER_H_
2 | #define _ILOGICDISPATCHER_H_
3 |
4 | #pragma warning( push )
5 | #pragma warning( disable:4100 )
6 |
7 | class BasePacket;
8 | class ILogicEntry;
9 | class IRPCService;
10 |
11 | class ILogicDispatcher
12 | {
13 | public:
14 | virtual void Dispatch(BasePacket* pPacket) = 0;
15 |
16 | virtual bool CreateLogicSystem(ILogicEntry* pLogicEntry) = 0;
17 | virtual bool ShutDownLogicSystem() = 0;
18 |
19 | virtual bool AddRPCService(IRPCService* pService) {return false;}
20 | };
21 |
22 | #pragma warning( pop )
23 |
24 | #endif // _ILOGICDISPATCHER_H_
--------------------------------------------------------------------------------
/BaseLayer/SFEncryption.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | template
4 | class SFEncrytion
5 | {
6 | public:
7 | SFEncrytion(void);
8 | virtual ~SFEncrytion(void);
9 |
10 | static bool Encrypt(unsigned char* pSrc, unsigned int Length);
11 | static bool Decrypt(unsigned char* pSrc, unsigned int Length);
12 | };
13 |
14 | template
15 | bool SFEncrytion::Encrypt(unsigned char* pSrc, unsigned int Length)
16 | {
17 | return T::Encrypt(pSrc, Length);
18 | }
19 |
20 | template
21 | bool SFEncrytion::Decrypt(unsigned char* pSrc, unsigned int Length)
22 | {
23 | return T::Decrypt(pSrc, Length);
24 | }
--------------------------------------------------------------------------------
/CGSFNet/CommonStructure.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #pragma pack(push, 1)
3 |
4 | typedef struct tag_UserInfo
5 | {
6 | int Serial;
7 | int ConnectionCount;
8 |
9 | tag_UserInfo()
10 | {
11 | Serial = -1;
12 | ConnectionCount = 0;
13 | }
14 |
15 | }_UserInfo;
16 |
17 | typedef struct tag_IPInfo
18 | {
19 | DWORD LocalIP;
20 | USHORT LocalPort;
21 | DWORD ExternalIP;
22 | USHORT ExternalPort;
23 |
24 | tag_IPInfo()
25 | {
26 | Clear();
27 | }
28 |
29 | void Clear()
30 | {
31 | LocalIP = 0;
32 | LocalPort = 0;
33 | ExternalIP = 0;
34 | ExternalPort = 0;
35 | }
36 |
37 | }_IPInfo;
38 |
39 | #pragma pack(pop)
--------------------------------------------------------------------------------
/EngineLayer/SFMacro.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #define SF_GETPACKET_ARG(a,b,c) memcpy(a,b.c_str(), sizeof(c));
4 |
5 | #define SFSYSTEM SFEngine
6 |
7 | //#define SFSYSTEM_SERVER(arg1, arg2, arg3) SFEngine
8 | //#define SFSYSTEM_CLIENT SFEngine
9 |
10 | //#define SFSYSTEM_SERVER SFEngine
11 | //#define SFSYSTEM_CLIENT SFEngine
12 |
13 | #define DATABASE_TSS ACE_TSS
14 |
15 | #define CGSF_PACKET_OPTION PACKET_OPTION_DATACRC|PACKET_OPTION_ENCRYPTION|PACKET_OPTION_COMPRESS
--------------------------------------------------------------------------------
/Sample/TankServer/TankProtocol.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "TankProtocol.h"
3 | #include "SFProtobufPacket.h"
4 | #include "Tank.pb.h"
5 |
6 | #define DEFAULT_PACKET_ID 1
7 |
8 | TankProtocol::TankProtocol()
9 | {
10 | }
11 |
12 |
13 | TankProtocol::~TankProtocol()
14 | {
15 | }
16 |
17 | BasePacket* TankProtocol::CreateIncomingPacketFromPacketId(int packetId, int channel)
18 | {
19 | switch (packetId)
20 | {
21 | case DEFAULT_PACKET_ID:
22 | return new SFProtobufPacket(packetId);
23 |
24 | default:
25 | SFASSERT(0);
26 | break;
27 | }
28 | return NULL;
29 | }
--------------------------------------------------------------------------------
/DotCGSF/EchoServerNet/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace EchoServerNet
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 해당 응용 프로그램의 주 진입점입니다.
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/EngineLayer/SFSubject.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include "SFObject.h"
4 |
5 | class SFObserver;
6 | class SFMessage;
7 |
8 | class SFSubject : public SFObject
9 | {
10 | typedef std::list Observerlist;
11 | public:
12 | SFSubject(void);
13 | virtual ~SFSubject(void);
14 |
15 | bool AddObserver(SFObserver* pObject);
16 | bool DelObserver(SFObserver* pObject);
17 |
18 | bool PropagateMessage(SFMessage* pMessage);
19 |
20 | int GetObserverCount(){ return (int)m_Observerlist.size();}
21 |
22 | protected:
23 | bool CheckDuplicate(SFObserver* pObject);
24 |
25 | private:
26 | Observerlist m_Observerlist;
27 | };
28 |
--------------------------------------------------------------------------------
/DotCGSF/EchoServerNet/ServerNetwork.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Threading;
7 |
8 | using CgsfNET64Lib;
9 | using CGSFNETCommon;
10 |
11 | namespace EchoServerNet
12 | {
13 | class ServerNetwork : CgsfNET64
14 | {
15 | override public bool ProcessPacket()
16 | {
17 |
18 | Thread cur_thread = Thread.CurrentThread;
19 | DevLog.Write(string.Format("Thread Id:{0}", cur_thread.ManagedThreadId));
20 | return true;
21 | }
22 |
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/EngineLayer/SFLogicGateway.cpp:
--------------------------------------------------------------------------------
1 | #include "SFLogicGateway.h"
2 |
3 | SFLogicGateway* SFLogicGateway::m_pLogicGateway = nullptr;
4 |
5 | SFLogicGateway::SFLogicGateway(void)
6 | {
7 | }
8 |
9 | SFLogicGateway::~SFLogicGateway(void)
10 | {
11 | }
12 |
13 | bool SFLogicGateway::PushPacket( BasePacket* pPacket )
14 | {
15 | return m_queue.Push(pPacket);
16 | }
17 |
18 | BasePacket* SFLogicGateway::PopPacket(int WaitTime)
19 | {
20 | return m_queue.Pop(WaitTime);
21 | }
22 |
23 | SFLogicGateway* SFLogicGateway::GetInstance()
24 | {
25 | if (m_pLogicGateway == nullptr)
26 | m_pLogicGateway = new SFLogicGateway();
27 |
28 | return m_pLogicGateway;
29 | }
--------------------------------------------------------------------------------
/EngineLayer/SFLogicGateway.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "../CGSFNet/BasePacket.h"
3 | #ifdef _WIN32
4 | #include "../BaseLayer/SFIOCPQueue.h"
5 | #endif
6 | #include "../BaseLayer/SFLockQueue.h"
7 |
8 | class SFLogicGateway
9 | {
10 | public:
11 | SFLogicGateway(void);
12 | virtual ~SFLogicGateway(void);
13 |
14 | static SFLogicGateway* GetInstance();
15 |
16 | bool PushPacket(BasePacket* pPacket);
17 | BasePacket* PopPacket(int WaitTime = -1);
18 |
19 | private:
20 | #ifdef _WIN32
21 | SFIOCPQueue m_queue;
22 | #else
23 | SFLockQueue m_queue;
24 | #endif
25 | static SFLogicGateway* m_pLogicGateway;
26 |
27 | };
28 |
29 |
--------------------------------------------------------------------------------
/Sample/ProtoBufServer/ProtoBufProtocol.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "ProtoBufProtocol.h"
3 | #include "SFProtobufPacket.h"
4 | #include "SampleMessage.pb.h"
5 |
6 | #define DEFAULT_PACKET_ID 1
7 |
8 | ProtoBufProtocol::ProtoBufProtocol()
9 | {
10 | }
11 |
12 |
13 | ProtoBufProtocol::~ProtoBufProtocol()
14 | {
15 | }
16 |
17 | BasePacket* ProtoBufProtocol::CreateIncomingPacketFromPacketId(int packetId, int channel)
18 | {
19 | switch (packetId)
20 | {
21 | case SAMPLE::HELLO:
22 | return new SFProtobufPacket(packetId);
23 |
24 | default:
25 | SFASSERT(0);
26 | break;
27 | }
28 | return NULL;
29 | }
--------------------------------------------------------------------------------
/EngineLayer/ILogicEntry.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include