Пример #1
0
 public void Disconnect()
 {
     if (this.servInterface != null) {
         this.servInterface.Disconnect();
         this.servInterface = null;
     }
 }
Пример #2
0
    // Load scripts
    void InitializeScripts()
    {
        // --- Web sockets
        serverInterface = new ServerInterface();
        serverInterface.Initialize();

        // --- Interfaces
        List<UIBase> interfaces = new List<UIBase>();

        // Dashboard
        UIBase dashboard = interfaceObject.GetComponent<DashboardUI>();
        dashboard.Initialize();
        interfaces.Add(dashboard);

        // Facebook
        UIBase facebookPanel = interfaceObject.GetComponent<FacebookPanel>();
        dashboard.Initialize();
        interfaces.Add(dashboard);

        activeInterfaces = interfaces.ToArray();

        // --- Events
        eventProcessor = eventProcessorObject.GetComponent<EventProcessor>();
        eventProcessor.Initialize();

        // --- Get main page content
        //Debug.Log("pinging server for content....");
    }
Пример #3
0
        public Simulator(ServerInterface serverInterface, string simId)
        {
            this.simId = simId;
            this.simInterface = serverInterface.ConnectToSim(this.simId);

            this.Init();
            this.log = new SimulatorLog(this.simInterface);
        }
Пример #4
0
        public Simulator(ServerInterface serverInterface, string name, string description)
        {
            this.simId = serverInterface.StartSim(name, description);
            this.simInterface = serverInterface.ConnectToSim(this.simId);

            this.Init();
            this.log = new SimulatorLog(this.simInterface);
        }
Пример #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            int port = int.Parse(textBox1.Text);
            TcpChannel channel = new TcpChannel(port);
            ChannelServices.RegisterChannel(channel, false);

            RemoteClient rc = new RemoteClient();
            RemotingServices.Marshal(rc, "ChatClient", typeof(RemoteClient));

            server = (ServerInterface)Activator.GetObject(
                typeof(ServerInterface),
                "tcp://localhost:8086/ChatServer");

            try
            {
                server.Connect(port);
            }
            catch (SocketException)
            {
                System.Console.WriteLine("Could not locate server");
            }
        }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.recievePacketHistory(List, username);
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.recieveLoadFile(this);
 }
Пример #8
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.SaveData();
 }
Пример #9
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.ReceiveMeasurement(measurement, physicianName, training);
 }
Пример #10
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.GetUsers();
 }
Пример #11
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.Broadcast(sender, message);
 }
Пример #12
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.ChatMessage(sender, receiver, message);
 }
Пример #13
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.AddUser(user,physicianName);
 }
Пример #14
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.NewUsers(users);
 }
Пример #15
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.receivePacketSession(this);
 }
Пример #16
0
 public EgonServer(string releasePath)
 {
     this.servInterface = null;
     this.releasePath = releasePath;
 }
Пример #17
0
 public void Connect(String username, String server, int port)
 {
     this.servInterface = new ServerInterface(username, server, port);
     this.simulators = new List<Simulator>();
     this.refreshSimsList();
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.SaveWerkbon(werkbon);
 }
Пример #19
0
 public virtual void handleServerSide(ServerInterface serverInterface)
 {
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.GetWerkbonnen();
 }
Пример #21
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.receiveChatPacket(this);
 }
 bool ConnectToServer()
 {
     bool success = false;
     try
     {
         remoteObject = (ServerInterface)Activator.GetObject(typeof(ServerInterface),
         "tcp://" + ServerIP + ":" + ServerPort + "/" + ServerServiceName);
         success = true;
     }
     catch (System.Net.Sockets.SocketException sock)
     {
         MessageBox.Show("SocketException: Server Is not Running");
     }
     catch (System.Reflection.TargetInvocationException tg)
     {
         MessageBox.Show("TargetInvocationException");
     }
     return success;
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.sendMeasurementList();
 }
Пример #24
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.AddUser(user);
 }
Пример #25
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.ReceiveMeasurement(measurement, physicianName, sessionType, username);
 }
Пример #26
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.login(username, password);
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.receivePacketBicycleCommand(this);
 }
Пример #28
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.GiveUser(username, allUsers, physicianName);
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.NewWerkbonnen(werkbonnen);
 }
Пример #30
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.BikeValues(power, time, distance, username);
 }