-
-
Notifications
You must be signed in to change notification settings - Fork 295
Expand file tree
/
Copy pathProgram.cs
More file actions
26 lines (24 loc) · 934 Bytes
/
Program.cs
File metadata and controls
26 lines (24 loc) · 934 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// -----------------------------------------------------------------------
// <copyright file="Program.cs" company="Asynkron HB">
// Copyright (C) 2015-2017 Asynkron HB All rights reserved
// </copyright>
// -----------------------------------------------------------------------
using System;
using System.Threading;
using System.Threading.Tasks;
using Messages;
using Proto;
using Proto.Remote;
using ProtosReflection = Messages.ProtosReflection;
class Program
{
static void Main(string[] args)
{
Serialization.RegisterFileDescriptor(ProtosReflection.Descriptor);
Remote.Start("127.0.0.1", 12001);
var pid = Remote.SpawnNamedAsync("127.0.0.1:12000", "remote", "hello", TimeSpan.FromSeconds(5)).Result.Pid;
var res = pid.RequestAsync<HelloResponse>(new HelloRequest { }).Result;
Console.WriteLine(res.Message);
Console.ReadLine();
}
}