netease / pomelo-unityclient-socket Goto Github PK
View Code? Open in Web Editor NEWpomele dotnet client
pomele dotnet client
sdk里面还有些bug,已经在我的分支上修复,但是现在这个项目处于没人维护的状态,希望能添加我为collaborator参与维护这个项目。
c#,i cant find convert at SimpleJson namespace,please help.
I am trying to reimplement chat application.
when I wrote callbacks in client.On and client.request with Unity API. It turned out that those callbacks was called from another thread invoked by async operation.
And all Unity API can only be called from main unity thread.
I am now using flags to indicate callbacks was called. this is obviously a bad idea leading to massy code.
I am wondering if I did something wrong. or there is a better solution?
I am using the latest pomelo-unitylcient-socket and 0.4.1 pomelo server.
many thanks, 非常感谢
yours sfszh
NetWorkStateChangedEvent监听的连接状态state在刚刚new出来的时候是CONNECT,但是调用了connect()之后就变成DISCONNECT了
look my fork use newtonsoft-json
Hi,
I try to use this with ipv6 and got fail. How can I solve this issue?
Regards,
unity 5.5 update mono version. So this project can not be run on unity 5.5 now.
旧版本 pomelo-unityclient-socket 有pc.on(PomeloClient.EVENT_DISCONNECT, onDisconnect);的方式获得断线状态。
这个版本如何获得客户端的断线状态呢?另外是否有连接超时时间的设置
客户端正常发送心跳时,突然断开服务端,会在Transport->endReceive->socket.EndReceive()方法时抛出异常,导致OnDisconnect不能正确结束。
We have a handler return json data like this:
{
serverList: [{'a':'some ip'}, {'b': 'an other ip'}]
}
It works fine on Android and HTML, but on iOS will get error and can't get correct data, anybody resolved this problem? or any idea?
Please help, we have work so long on a pomelo game project.
Hi everybody,
I have user lib pomelo-unityclient-socket to connect server pomelo. But when using domain name it not working.
string host = "mydomaincom";// Not working with domain name
int port = 80;
pc = new PomeloClient(host, port);
pc.connect(null, (data)=>{
JsonObject msg = new JsonObject();
msg["uid"] = "123456";
pc.request("gate.gateHandler.queryEntry", msg, OnQuery);
});
And i don't know using ssl to connect server.
Can any one tell me how using?
这个登录后,关闭网络,检测到断开,打开网络,再去new PomeloClient 然后连接服务器 服务器必然出现错误。
[connector-server-1] getSession session is created with session id: 5
[connector-server-1] handleMessage session id: 5, msg: {"id":10001,"type":0,"compressRoute":1,"route":"gate.gateHandler.reqConnect","body":{},"compressGzip":0}
fail to forward message:TypeError: Cannot read property 'forwardMessage' of undefined
无法链接成功
IPAddress[] addresses = Dns.GetHostEntry(host).AddressList;
这句代码经常要执行超3秒
Any chance of adding WebGL platform support? Thank you.
Please disregard was meant for the pomelo unity chat project
Hi,
I tried this but it always freezing the unity.
void OnApplicationQuit()
{
if (pclient != null)
{
Debug.Log("quit");
pclient.disconnect();
}
}
Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in :0
at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in :0
at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in :0
at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in :0
at Mono.CSharp.Driver.LoadReferences () [0x00000] in :0
at Mono.CSharp.Driver.Compile () [0x00000] in :0
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in :0
是不是编译成dll的.net版本太高了??
使用环境osx10.10.4 unity 5.1.1f1
I ran a few tests using chatofpomelo and the Unity3D demo. Seems like when I am sending more than 1600 characters from the server to unity, unity does not receive anything. Is there a message size limit? or is this a bug? or am i suppose to be using compression? Doesn't seem like a lot of data....
Hi,
You cann't build a Unity3d Web Player Release, the reason for this is the Security Sand Box of the Web Player (see http://docs.unity3d.com/Manual/SecuritySandbox.html).
The following error message appears when you try to build your Unity3d project on the Web Player Platform:
ArgumentException: The Assembly System.Runtime.Serialization is referenced by SimpleJson. But the dll is not allowed to be included or could not be found....
SimpleJson is using Reflections these won't be supported by the Web Player Subset.
At the moment I'm trying to replace the SimpleJson.dll with the SimpleJSON from the Unify Community (http://wiki.unity3d.com/index.php/SimpleJSON). Maybe someone of you could give me some feedback to this decision and/or maybe someone comes up with an other idea.
Best Regards
Flo
所有的请求回调都没切到主线程 Unity 一直报错 ‘XXX’ can only be called in main thread,
internal void start (JsonObject user, Action callback)
{
this.transporter.start ();
this.handshake.request (user, callback);
this.state = ProtocolState.handshaking;
}
为什么要调用transporter.start,里面方法直接就是接受数据,但是之前没有并没有send数据啊,而数据长度为0还要断开连接,安全搞不懂了。
现在和pomelo握手没有数据返回
Can be used in Unity3D?
Hi,
I'm new to client-server sort of things and quite not sure if it's a bug or that's what you intend to do.
For HeartBeatService.cs, the timeout is set to interval*2, but the real timeout happened at interval * 3, coz the timeout is adding up(HeartBeatService.cs line 37~38) below the timeout checking.
Any suggestion? Thanks in advance.
when use protobuf, and handshaked buffer > 1024 , then Transporter error.
file Transporter.cs line 8:
public const int BufferSize = 1024;
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.