Protobufs compile
This commit is contained in:
10
Aurora/Backend/Services/Server/PartyServiceImpl.cs
Normal file
10
Aurora/Backend/Services/Server/PartyServiceImpl.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using Aurora.Backend.Proto;
|
||||
|
||||
namespace Aurora.Backend.Services.Server
|
||||
{
|
||||
class PartyServiceImpl : PartyService.PartyServiceBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
10
Aurora/Backend/Services/Server/PlaybackServiceImpl.cs
Normal file
10
Aurora/Backend/Services/Server/PlaybackServiceImpl.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using Aurora.Backend.Proto;
|
||||
|
||||
namespace Aurora.Backend.Services.Server
|
||||
{
|
||||
class PlaybackServiceImpl : PlaybackService.PlaybackServiceBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
28
Aurora/Backend/Services/Server/ServerService.cs
Normal file
28
Aurora/Backend/Services/Server/ServerService.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using Grpc.Core;
|
||||
using Aurora.Backend.Proto;
|
||||
|
||||
namespace Aurora.Backend.Services.Server
|
||||
{
|
||||
public class ServerService : BaseService<ServerService>
|
||||
{
|
||||
const int Port = 50051;
|
||||
public ServerService()
|
||||
{
|
||||
Grpc.Core.Server server = new Grpc.Core.Server
|
||||
{
|
||||
Services = {
|
||||
PartyService.BindService(new PartyServiceImpl()),
|
||||
PlaybackService.BindService(new PlaybackServiceImpl()) },
|
||||
Ports = { new ServerPort("localhost", Port, ServerCredentials.Insecure) }
|
||||
};
|
||||
server.Start();
|
||||
|
||||
Console.WriteLine("Aurora server listening on port " + Port);
|
||||
Console.WriteLine("Press any key to stop the server...");
|
||||
Console.ReadKey();
|
||||
|
||||
server.ShutdownAsync().Wait();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user