Skip to content

Commit

Permalink
Add method to register service
Browse files Browse the repository at this point in the history
  • Loading branch information
rdegnan committed Jul 7, 2019
1 parent ccbf307 commit 2eb3bb1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Netifi.Broker.Client/BrokerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Threading;
using System.Threading.Tasks;
using RSocket;
using RSocket.RPC;

namespace Netifi.Broker.Client
{
Expand Down Expand Up @@ -66,6 +67,11 @@ public async Task ConnectAsync()
await client.ConnectAsync(options, metadata: writeSetupMetadata());
}

public void AddService(IRSocketService service)
{
RSocketService.Register(client, service);
}

public RSocket.RSocket Group(string group, SortedDictionary<string, string> tags = default)
{
return new BrokerSocket(client, metadata =>
Expand Down
4 changes: 4 additions & 0 deletions Netifi.Broker.Client/Netifi.Broker.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@
<ItemGroup>
<ProjectReference Include="..\Netifi.Broker.Frames\Netifi.Broker.Frames.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="RSocket.Rpc.Core" Version="0.2.10" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Netifi.Broker.Idl/Netifi.Broker.Idl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="RSocket.Rpc.Core" Version="0.2.9" />
<PackageReference Include="RSocket.Rpc.Core" Version="0.2.10" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 2eb3bb1

Please sign in to comment.