-
-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the ChatRoomService example, BroadcastAllAsync (x => x.OnJoin) x always NullReferenceException #41
Comments
it is caused from does not call RegisterStreamingMethod before call at once. |
So how do I fix this problem now? |
Who calls BroadcastAll? |
|
Now this problem can not be resolved, there are other ways, I do not know where to modify. |
please show reproduce client code. static async Task RunChat(ChannelContext ctx)
{
// create room
var client = ctx.CreateClient<IChatRoomService>();
var room = await await client.CreateNewRoom("test", "A"); // TODO:IChatRoomCommand sample is old so require await await...
var result = await await client.SendMessage(room.Id, "foo bar baz");
Console.WriteLine("Send success:" + result);
} |
|
Do you need to do two "ToYieldInstruction" here? |
ah, sorry, require subscribe OnJoin before do anything. |
I've fixed sample code and upload main fix is add new api, when creating StreamingContextRepository new StreamingContextRepository<IChatRoomStreaming>(connection, this); |
Sorry, did not see the version update! |
|
this is for C# 7.0 only, if you have to use old c#, change signature to |
Does Unity3d need this? |
|
How to solve this problem?
The text was updated successfully, but these errors were encountered: