public Task SubmitTransaction(string playerId, string command, string args) { var dto = new TransactionCommandDto { PlayerId = playerId, Command = command, Args = args }; return(_scene.RpcVoid("transaction.submit", dto)); }
/// <summary> /// Sends a remote procedure call with an object as input, expecting no answer /// </summary> /// <typeparam name="TData">The type of data to send</typeparam> /// <param name="scene">The target scene.</param> /// <param name="route">The target route.</param> /// <param name="data">The data object to send.</param> /// <param name="priority">The priority level used to send the request.</param> /// <returns>A task representing the remote procedure.</returns> public static Task RpcVoid <TData>(this Scene scene, string route, TData data, PacketPriority priority = PacketPriority.MEDIUM_PRIORITY) { return(scene.RpcVoid(route, s => scene.Host.Serializer().Serialize(data, s), priority)); }
public static Task RpcVoid <TData>(this Scene scene, string route, TData data, CancellationToken cancellationToken, PacketPriority priority = PacketPriority.MEDIUM_PRIORITY) { return(scene.RpcVoid(route, stream => scene.Host.Serializer().Serialize(data, stream), cancellationToken, priority)); }
public static Task RpcVoid <TData>(this Scene scene, string route, TData data, PacketPriority priority = PacketPriority.MEDIUM_PRIORITY) { return(scene.RpcVoid <TData>(route, data, CancellationToken.None, priority)); }
public static Task RpcVoid(this Scene scene, string route, Action <Stream> writer, PacketPriority priority = PacketPriority.MEDIUM_PRIORITY) { return(scene.RpcVoid(route, writer, CancellationToken.None, priority)); }