Exemplo n.º 1
0
    void Start()
    {
        this.channel       = new Channel("localhost:12345", ChannelCredentials.Insecure);
        this.sampleService = MagicOnionClient.Create <ISampleService>(channel);
        this.sampleHub     = StreamingHubClient.Connect <ISampleHub, ISampleHubReceiver>(this.channel, this);

        this.SampleServiceTest(1, 2);

        this.SampleHubTest();
    }
Exemplo n.º 2
0
    async void Start()
    {
        this.channel             = new Channel("localhost:12345", ChannelCredentials.Insecure);
        this.sampleHub           = StreamingHubClient.Connect <ISampleHub, ISampleHubReceiver>(channel, this);
        Application.wantsToQuit += Application_wantsToQuit;

        msg.text = "";
        await this.sampleHub.JoinAsync(myName);

        await this.sampleHub.SendMessageAsync($"Hello outside world.");

        await this.sampleHub.MovePosition(sharedTarget.transform.position, sharedTarget.transform.rotation);
    }
        private async Task Start()
        {
            _channel = new Channel(host, port, ChannelCredentials.Insecure);

            var client = MagicOnionClient.Create <ISampleService>(_channel);
            var greet  = await client.GreetAsync(user);

            Debug.Log(greet);

            _receiver = new SampleHubReceiver();
            _hub      = StreamingHubClient.Connect <ISampleHub, ISampleHubReceiver>(_channel, _receiver);
            await _hub.JoinAsync(user, room);
        }
 public CommunicationHub()
 {
     this.channel   = new Channel("localhost:12345", ChannelCredentials.Insecure);
     this.sampleHub = StreamingHubClient.Connect <ISampleHub, ISampleHubReceiver>(channel, this);
 }