topfreegames / libpitaya Goto Github PK
View Code? Open in Web Editor NEWa client sdk for pitaya game server framework
License: MIT License
a client sdk for pitaya game server framework
License: MIT License
I'm use your "ios/PitayaClient", when i use the "pod install" command,There are some errors:
Analyzing dependencies
Fetching podspec for `Pitaya` from `../../`
Cloning spec repo `topfreegames-cocoapods-specs` from `[email protected]:libs-frameworks/cocoapods-specs.git`
[!] Unable to add a source with url `[email protected]:libs-frameworks/cocoapods-specs.git` named `topfreegames-cocoapods-specs`.
You can try adding it manually in `/Users/arden/.cocoapods/repos` or via `pod repo add`.
You used some private git repository.
We got an error that the PitayaClient:Finalize
was called on another thread on the Unity Editor, and this triggered the fail events of the pending requests, which should be executed on the main thread. This caused an Unity Exception since we were accessing gameobjects from another thread.
How does the ios client listen for messages broadcast from the server? I can't find a way to do this in c code.
How does android client listen for messages broadcast from the server?
I didn't find any relevant code in the c code.
Is there have a good example of android? We are now working on this framework.
We are using swift language now, and we are currently investigating whether this development framework supports Swift well?
I've created an ios project, and import the "_builds/ios/libpitaya-ios.a","libz.a, libuv_a.a" to project,But not to found "libssl.a and libcrypto.a".
When i'm build the project, that can't find "pitaya.h, pc_pitaya_i.h" in the code.
I am a Unity developer, want to start json-server, to test unity demo, but do not know how to operate, can you provide some videos or operation documents for the server white
I want to use xlua to call libpitaya's c# interface in unity project, but lua has no generics. How to call Request method in lua
client.Request(" connector.getsessiondata",...
I use Unity to run on Linux "libpitaya\unity\PitayaExample":
DllNotFoundException: pitaya-linux assembly:<unknown assembly> type:<unknown type> member:(null) Pitaya.StaticPitayaBinding.SetLogFunction (NativeLogFunction fn) (at Assets/Pitaya/PitayaBinding.cs:138) Pitaya.StaticPitayaBinding..cctor () (at Assets/Pitaya/PitayaBinding.cs:130) Rethrow as TypeInitializationException: The type initializer for 'Pitaya.StaticPitayaBinding' threw an exception.
I use Unity to run on Windows "libpitaya\unity\PitayaExample":
There are similar errors,When I install vc_redist.exe, these errors are gone.
So,What libraries do I need to install on linux to run "libpitaya\unity\PitayaExample"?
Version used: v1.1.0
Connector keeps spamming this "Error reading next available message: invalid header" message:
{"file":"/home/jenkins/jobs/tennis-build-backend/builds/988/pkg/mod/github.com/topfreegames/[email protected]/service/handler.go:186","func":"github.com/topfreegames/pitaya/service.(*HandlerService).Handle","level":"error","msg":"Error reading next available message: invalid header","server":"connector","source":"tennis","time":"2020-04-22T01:06:03Z”}
Is that expected or are we doing something wrong? Apparently it happens when a user disconnects. Doesn’t seem to cause any harm, but if this is not really an unexpected error, we could save some space (8M hits per day).
Related code: https://github.com/topfreegames/pitaya/blob/3d3b62a19e45b2f98847424e53ae3f7ef255502a/service/handler.go#L186
using NSubstitute; no reference in Assets\Tests\PitayaClientTest.cs
in Pitaya-Build-Template.csproj
Before I have file PitayaIOSInfo.mm which implement _PitayaGetCFBundleVersion, It seem new version v4.4.0 delete this file
I was compiling the android client library on MacOS with the following errors, but I had ninja installed.
make setup-mac
make build-android
CMake Error at /usr/local/Cellar/cmake/3.12.3/share/cmake/Modules/CMakeDetermineSystem.cmake:100 (message):
Could not find toolchain file:
../temp/android-ndk-r17b/build/cmake/android.toolchain.cmake
Call Stack (most recent call first):
CMakeLists.txt:11 (project)
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
make: *** [build-android] Error 1
this client lib can be support protobuf?
Hi
I want to set client config form C#.
Cant you tell me how ?
Thanks!
void pc__trans_push(pc_client_t *client, const char *route, const pc_buf_t *buf)
{
pc_assert(client);
if (!client || !buf->base || buf->len < 0) {
pc_lib_log(PC_LOG_ERROR, "pc__trans_push - error parameters");
return;
}
if (buf->len == 0) {
pc_lib_log(PC_LOG_ERROR, "pc__trans_push - empty buffer");
return;
}
pc_lib_log(PC_LOG_INFO, "pc__trans_push - route: %s", route);
/* invoke handler */
if (client->push_handler) {
client->push_handler(client, route, buf);
}
}
The "buf->len" condition will stop push handler. Send an empty packet under proto3, the client cannot receive the message.
message OnExpChange {
int32 exp = 1;
}
if exp is 0, client will not receive the message
Hi,
I'm using the unity sdk, but I don't find any reset API for RECONNECT case.
I'm not sure if it will cause some problems.
thanks.
How to generate libpitaya.so files on each Android CPU platform? like armeabi, armeabi-v7a, x86, MIPS, arm64-v8a, mips64, x86_64
On iOS, the library arm64_armv7 no libssl.a file
Xcode notify undefined symbol _ssl_write
_ssl_get_peer ........
Is there any way to slim down this library? When I used “pod install” in ios, the library was so large that the download was slow.
Version 4.4.0 introduced native iOS libraries for simulator builds (PR). It also introduced a preprocessor that ensures either the simulator libraries or device libraries are present during builds. However, this preprocessor only seems to work for the unity/PitayaExample
project, as it expects the native libraries to be under Assets/Pitaya/Native/iOS
. This is not the case where the library is installed via Unity Package Manager (being on Library/PackageCache...
) or on any different folder. The preprocessor should be able to detect where the libpitaya package is installed or it should have a single universal library containing both targets.
How can I compile a windows-based DLL dynamic link library on macos?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.