コード例 #1
0
        public void Init()
        {
            Client = new SecondLife();
            Client.Network.AgentID = LLUUID.GenerateUUID();
            Client.Network.SessionID = LLUUID.GenerateUUID();

            Server = new DebugServer("keywords.txt", "message_template.msg", 8338);
            Assert.IsTrue(Server.Initialized, "Failed to initialize the server, couldn't bind to port 8338?");

            Simulator debugSim = Client.Network.Connect(IPAddress.Loopback, 8338, 1, true);
            Assert.IsNotNull(debugSim, "Failed to connect to the debugging simulator");

            Client.Network.RegisterCallback(PacketType.SimulatorAssign, new PacketCallback(SimulatorAssignHandler));
        }
コード例 #2
0
        public void Shutdown()
        {
            try
            {
                Client.Network.SendPacket(System.Text.Encoding.UTF8.GetBytes("stopserver"));
                Client.Network.Logout();
            }
            catch (NotConnectedException)
            {
                Assert.IsTrue(false, "Logout failed, not connected");
            }

            Client = null;
            Server = null;
        }
コード例 #3
0
        public void Shutdown()
        {
            try
            {
                Client.Network.SendPacket(System.Text.Encoding.UTF8.GetBytes("stopserver"));
                Client.Network.Logout();
            }
            catch (NotConnectedException)
            {
                Assert.IsTrue(false, "Logout failed, not connected");
            }

            Client = null;
            Server = null;
        }
コード例 #4
0
        public void Init()
        {
            Client = new SecondLife();
            Client.Network.AgentID   = LLUUID.GenerateUUID();
            Client.Network.SessionID = LLUUID.GenerateUUID();

            Server = new DebugServer("keywords.txt", "message_template.msg", 8338);
            Assert.IsTrue(Server.Initialized, "Failed to initialize the server, couldn't bind to port 8338?");

            Simulator debugSim = Client.Network.Connect(IPAddress.Loopback, 8338, 1, true);

            Assert.IsNotNull(debugSim, "Failed to connect to the debugging simulator");

            Client.Network.RegisterCallback(PacketType.SimulatorAssign, new PacketCallback(SimulatorAssignHandler));
        }