Example #1
0
        private void ProcessMessage(InputChannel channel)
        {
            var path     = (string)channel.Read();
            var message  = channel.Read();
            var actorref = this.system.ActorSelect(path);

            actorref.Tell(message);
        }
Example #2
0
        public object DeserializerObject(InputChannel channel)
        {
            var obj = Activator.CreateInstance(this.type);

            foreach (var prop in this.properties)
            {
                this.type.GetProperty(prop.Name).SetValue(obj, channel.Read(), null);
            }

            return(obj);
        }
Example #3
0
        private void ProcessClient(System.Net.Sockets.TcpClient client)
        {
            try
            {
                var inputchannel = new InputChannel(new BinaryReader(client.GetStream()));

                while (true)
                {
                    this.ProcessMessage(inputchannel);
                }
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex.StackTrace);
            }
        }