private void InjectIntoProcess(int targetPID, string targetProcessName)
        {
            if (_crashList.Contains(targetProcessName))
            {
                return;
            }

            Thread.Sleep(1000);

            try
            {
                Log($"Attempting to inject into process {targetProcessName}, PID {targetPID}");

                string          channelName = null;
                ServerInterface server      = new ServerInterface(Log, RemoveServer, ShouldAbort);
                RemoteHooking.IpcCreateServer(ref channelName, WellKnownObjectMode.Singleton, server);

                RemoteHooking.Inject(
                    targetPID,
                    InjectionOptions.DoNotRequireStrongName,
                    _injectionLibraryPath,
                    _injectionLibraryPath,
                    channelName);

                _servers.AddOrUpdate(targetPID, server, (pid, s) => server);
            }
            catch (Exception ex)
            {
                Log($"Error: {ex}");
                _crashList.Add(targetProcessName);
            }
        }
        public void Start(ushort port, ushort maxConnections, String pw)
        {
            pw = "ver2.081" + pw;


            SocketDescriptor socketDescriptor = new SocketDescriptor();

            socketDescriptor.port = port;

            bool started = ServerInterface.Startup(maxConnections, socketDescriptor, 1) == StartupResult.RAKNET_STARTED;

            ServerInterface.SetMaximumIncomingConnections(maxConnections);
            ServerInterface.SetOccasionalPing(true);

            if (pw.Length != 0)
            {
                ServerInterface.SetIncomingPassword(pw, pw.Length);
            }

            if (!started)
            {
                Log.Logger.logError("Port is already in use");
            }
            else
            {
                Log.Logger.log("Server start listening on port " + port);
            }
        }
Exemple #3
0
            internal virtual ServerInterface ServerInOtherJvm(int port)
            {
                ServerInterface server = (new MadeUpServerProcess()).Start(new StartupData(StoreIdConflict.CreationTime, StoreIdConflict.RandomId, InternalProtocolVersionConflict, ApplicationProtocolVersionConflict, ChunkSizeConflict, port));

                server.AwaitStarted();
                return(server);
            }
Exemple #4
0
 public void ping()
 {
     for (int i = 0; i < knownProcesses.Count; i++)
     {
         string alive;
         try
         {
             if (knownProcesses[i].getId().Equals("server"))
             {
                 ServerInterface s = (ServerInterface)Activator.GetObject(
                     typeof(ServerInterface),
                     knownProcesses[i].getUrl());
                 //alive = s.ping();
             }
             else
             {
                 ClientInterface c = (ClientInterface)Activator.GetObject(
                     typeof(ClientInterface),
                     knownProcesses[i].getUrl());
                 // alive = c.ping();
             }
             // if (!alive.Equals("alive")) {
             //todo
             // }
         }
         catch (Exception e) {
             knownProcesses[i].addFail(new Fail());
         }
     }
 }
Exemple #5
0
        private static void Main(string[] args)
        {
            AppDomain.CurrentDomain.ProcessExit += CurrentDomain_ProcessExit;
            Process process = null;

            while (process == null)
            {
                process = Process.GetProcessesByName("Warframe.x64").FirstOrDefault();
            }

            string channelName = null;
            string libraryPath = "WfDx.dll";

            RemoteHooking.IpcCreateServer <ServerInterface>(ref channelName, WellKnownObjectMode.Singleton);
            client = RemoteHooking.IpcConnectClient <ServerInterface>(channelName);
            try
            {
                RemoteHooking.Inject(process.Id, libraryPath, libraryPath, channelName);
                Console.ReadLine();
                client.RunLibrary = false;
            }
            catch (Exception e)
            {
                Console.WriteLine($"Something goes wrong {e}");
            }
        }
Exemple #6
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....");
    }
Exemple #7
0
        public ServerInterface getServer(string server_url)
        {
            ServerInterface server = null;

            try
            {
                server = (ServerInterface)Activator.GetObject(typeof(ServerInterface), server_url);
            }
            catch (Exception)
            {
                Console.WriteLine("trying new server");
                string   serversList = "servers.txt";
                string[] serversURLs = File.ReadAllLines(serversList);
                foreach (string url in serversURLs)
                {
                    if (url != this.preferedServerUrl)
                    {
                        try
                        {
                            server = (ServerInterface)Activator.GetObject(typeof(ServerInterface), url);
                            this.setPreferedServerUrl(url);
                            Console.WriteLine("the new server is {0}", url);
                            return(server);
                        }
                        catch (Exception)
                        {
                            continue;
                        }
                    }
                }
            }
            return(server);
        }
Exemple #8
0
        public ServerInterface Execute()
        {
            int    client_number, n_replicas, try_replica;
            string server_url;

            client_number = Int32.Parse(this.clientLibrary.ClientIdentifier.Remove(0, 1));
            n_replicas    = this.clientLibrary.NReplicas;

            Console.WriteLine("Server knows \"" + client_number + "\" clients...");
            Console.WriteLine("Server has \"" + n_replicas + "\" replicas...");
            try_replica = (client_number % n_replicas) + 1;
            Console.WriteLine("Since current replica has failed will try to connect to replica \"" + try_replica + "\"...");

            for (int i = 0; i < n_replicas; i++)
            {
                server_url = "tcp://localhost:" + (try_replica + 3000) + "/Server" + try_replica;
                Console.WriteLine("Replica url: \"" + server_url + "\".");
                try
                {
                    this.clientLibrary.ServerURL = server_url;
                    this.remote_server           = (ServerInterface)Activator.GetObject(typeof(ServerInterface), server_url);
                    this.remote_server.IsAlive();
                    break;
                }
                catch (Exception exception) when(exception is System.Net.Sockets.SocketException || exception is System.IO.IOException)
                {
                    try_replica = ((try_replica + 1) % n_replicas) + 1;
                    Console.WriteLine(try_replica);
                }
            }

            return(this.remote_server);
        }
Exemple #9
0
 public void processCommand(string line)
 {
     string[] linesplit = line.Split(null);
     if (linesplit[0].Equals("skip"))
     {
         return;
     }
     else if (linesplit[0].Equals("GlobalStatus")) //globalstatus on client!!! improve globalstatus on server
     {
         globalStatus();
     }
     else if (linesplit[0].Equals("Crash")) //CRASH PID
     {
         if (serversUrl.Contains(mapa[linesplit[1]]))
         {
             ServerInterface s = (ServerInterface)Activator.GetObject(
                 typeof(ServerInterface),
                 mapa[linesplit[1]]);
             s.crash();
             serversUrl.Remove(mapa[linesplit[1]]);
             mapa.Remove(linesplit[1]);
         }
         else if (clientsUrl.Contains(mapa[linesplit[1]]))
         {
             ClientInterface c = (ClientInterface)Activator.GetObject(
                 typeof(ClientInterface),
                 mapa[linesplit[1]]);
             c.crash();
             clientsUrl.Remove(mapa[linesplit[1]]);
             mapa.Remove(linesplit[1]);
         }
     }
     else if (linesplit[0].Equals("LocalState")) /*todo*/ } {
Exemple #10
0
 public void Disconnect()
 {
     if (this.servInterface != null) {
         this.servInterface.Disconnect();
         this.servInterface = null;
     }
 }
Exemple #11
0
        public RequestStatus SendCloseRequest(MarketOrder order, PositionExitReason reason)
        {
            // получить счет
            RequestStatus error;
            var           acDecorated = ServerInterface.GetAccount(order.AccountID);

            if (acDecorated == null)
            {
                return(RequestStatus.ServerError);
            }

            // подготовить запрос
            TradeSharp.ProviderProxyContract.Entity.MarketOrder request;
            if (!MakeMarketRequest(acDecorated, order.Symbol, order.Magic, order.Volume, -order.Side,
                                   OrderType.Market,
                                   0, 0,
                                   string.Format("close order #{0}", order.ID),
                                   order.ID, order.Comment, order.ExpertComment, order.TrailLevel1, order.TrailTarget1,
                                   out error, out request))
            {
                return(error);
            }
            exitReasonByOrderId.UpdateValues(order.ID, reason);

            // отправить запрос на вход в рынок (оно же - закрытие позиции) в соотв сессию
            if (!request.SendToQueue(false))
            {
                errorStorage.AddMessage(new ErrorMessage(DateTime.Now, ErrorMessageType.ОшибкаОтправки,
                                                         "Невозможно отправить сообщение (CloseOrder) в очередь MQ", null));
                return(RequestStatus.DealerError);
            }
            return(RequestStatus.OK);
        }
Exemple #12
0
 private bool IsOverflooded(TradeTransactionRequest request, MarketOrder order)
 {
     try
     {
         var isFlooded = RequestStorage.Instance.CheckOverflood();
         if (isFlooded)
         {
             var errorResponse = new BrokerService.Contract.Entity.BrokerResponse
             {
                 AccountId          = request.Account,
                 Mt4OrderId         = request.ClosingPositionId ?? 0,
                 RejectReason       = OrderRejectReason.UnableMassCancel,
                 Status             = OrderStatus.Rejected,
                 RejectReasonString = "overflood",
                 RequestId          = request.Id,
                 ValueDate          = DateTime.Now
             };
             ServerInterface.NotifyClientOnOrderRejected(order, errorResponse.RejectReasonString);
             return(true);
         }
     }
     catch (Exception ex)
     {
         Logger.Error("Error in CheckOverflood()", ex);
         return(true);
     }
     return(false);
 }
Exemple #13
0
        public List <string> getClientsForGossip()
        {
            SortedSet <string> result      = new SortedSet <string>();
            string             serversList = "servers.txt";

            string[] serversURLs = File.ReadAllLines(serversList);
            foreach (string url in serversURLs)
            {
                try
                {
                    ServerInterface server           = (ServerInterface)Activator.GetObject(typeof(ServerInterface), url);
                    string          suggested_client = server.getRandomClient();
                    result.Add(suggested_client);
                }
                catch (Exception)
                {
                    continue;
                }
            }
            List <string> results_list = new List <string>();

            foreach (string client in result)
            {
                results_list.Add(client);
            }
            return(results_list);
        }
Exemple #14
0
        public void informServers()
        {
            this.setNodes();
            List <string> nodesToRemove = new List <string>();

            foreach (string url in this.servers)
            {
                ServerInterface server = null;
                try
                {
                    server = (ServerInterface)Activator.GetObject(typeof(ServerInterface), url);
                    if (server != null)
                    {
                        server.addClient(this.url);
                    }
                    else
                    {
                        nodesToRemove.Add(url);
                    }
                }
                catch (Exception)
                {
                    nodesToRemove.Add(url);
                }
            }

            foreach (string node in nodesToRemove)
            {
                this.servers.Remove(node);
            }
        }
Exemple #15
0
 public ClientHandler(TcpClient client, ServerInterface sender)
 {
     this.client = client;
     this.sender = sender;
     clientIp    = ((IPEndPoint)client.Client.RemoteEndPoint).Address.ToString();
     setTimer();
 }
Exemple #16
0
    // Use this for initialization
    void Start()
    {
        serverInterface = GetComponent <ServerInterface>();

        panelQuitConfirm.SetActive(false);
        loginListPanel.gameObject.SetActive(false);
        refreshButton.SetActive(false);
        connectButton.SetActive(false);
        createButton.SetActive(false);
        userCreateMessagePanel.SetActive(false);
        panelLobbyReady.SetActive(false);

        titleTextText = titleText.GetComponent <Text>();
        titleTextRect = titleText.GetComponent <RectTransform>();
        qButtonRect   = quitButton.gameObject.GetComponent <RectTransform>();
        lButtonRect   = loginButton.GetComponent <RectTransform>();
        sButtonRect   = settingsButton.GetComponent <RectTransform>();

        userCreateOkButton.onClick.AddListener(CloseUserCreation);
        loginButton.GetComponent <Button>().onClick.AddListener(Login);
        createUserButton.GetComponent <Button>().onClick.AddListener(UserCreation);
        quitButton.GetComponent <Button>().onClick.AddListener(QuitConfirmation);
        refreshButton.GetComponent <Button>().onClick.AddListener(RefreshList);
        createButton.GetComponent <Button>().onClick.AddListener(CreateLobby);
    }
Exemple #17
0
 static void Main(string[] args)
 {
     try
     {
         if (Properties.Settings.Default.UpgradeRequired)
         {
             Properties.Settings.Default.Upgrade();
             Properties.Settings.Default.UpgradeRequired = false;
             Properties.Settings.Default.Save();
         }
         Application.EnableVisualStyles();
         Application.SetCompatibleTextRenderingDefault(false);
         ServerInterface.SetBadCertificateHandler(BadCertificateHandler);
         var login = new Login();
         login.Show();
         Application.Run();
     }
     catch (Exception e)
     {
         ServiceDisconnectException(e);
     }
     finally
     {
         Properties.Settings.Default.Save();
     }
 }
Exemple #18
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);
        }
        public ushort ConnectionCount()
        {
            SystemAddress[] sa      = null;
            ushort          numbers = 0;

            ServerInterface.GetConnectionList(out sa, ref numbers);
            return(numbers);
        }
Exemple #20
0
 public void Connect(String server_URL)
 {
     Server = (ServerInterface)Activator.GetObject(
         typeof(ServerInterface),
         server_URL);
     this.Server_url = server_URL;
     Console.WriteLine("Registei o servidor. Sou o/a " + this.UserName);
 }
Exemple #21
0
        public Simulator(ServerInterface serverInterface, string simId)
        {
            this.simId = simId;
            this.simInterface = serverInterface.ConnectToSim(this.simId);

            this.Init();
            this.log = new SimulatorLog(this.simInterface);
        }
        // TODO: Create a channel for sending messages back and forth between this and LiveSplit
        public LiveSplitHelper(Process liveSplitProcess, string channelName, ServerInterface server)
        {
            _liveSplitProcess = liveSplitProcess;
            _windowBitmap     = null;
            _server           = server;

            Task.Run(WindowGrabBackgroundTask);
        }
Exemple #23
0
        public void TestCopyRemoteInterface()
        {
            var first  = CreateFakeRemoteInterface();
            var second = new ServerInterface(first);

            Assert.AreEqual(first.HTTPSURL, second.HTTPSURL);
            Assert.AreEqual(first.HTTPSPort, second.HTTPSPort);
            Assert.IsTrue(second.IsRemoteConnection);
        }
Exemple #24
0
        public void RequestProcessed(BrokerService.Contract.Entity.BrokerResponse response)
        {
            var request = RequestStorage.Instance.FindRequest(response.RequestId);

            if (request == null)
            {
                Logger.Info("MT4 executor - исходный запрос не найден: " + response);
                return;
            }

            Logger.Info("Ответ MT4 executor: " + response);

            if (response.Status != OrderStatus.Executed)
            {
                return;
            }

            // закрытие ордера
            if (request.request.IsClosingRequest)
            {
                if (!response.Price.HasValue)
                {
                    Logger.Error("Ответ MT4 executor - закрытие позиции - нет цены");
                    return;
                }

                ServerInterface.CloseOrder(request.requestedOrder.ID,
                                           response.Price.Value, PositionExitReason.Closed);
                return;
            }

            // открытие ордера
            if (!response.Price.HasValue)
            {
                response.RejectReason = OrderRejectReason.UnknownOrder;
            }
            if (response.RejectReason.HasValue && response.RejectReason.Value != OrderRejectReason.None)
            {
                ServerInterface.NotifyClientOnOrderRejected(request.requestedOrder,
                                                            response.RejectReasonString);
                Logger.DebugFormat("{0}: order {1} is rejected for reason {2}",
                                   DealerCode, request.requestedOrder.ToStringShort(), response.RejectReason);
                return;
            }

            var order = request.requestedOrder;

            order.PriceEnter  = (float)response.Price.Value;
            order.AccountID   = request.request.Account;
            order.TimeEnter   = DateTime.Now;
            order.State       = PositionState.Opened;
            order.MasterOrder = response.Mt4OrderId;

            int openedOrderId;

            ServerInterface.SaveOrderAndNotifyClient(order, out openedOrderId);
        }
Exemple #25
0
        public void informOtherServers(Command command)
        {
            Console.WriteLine("Inform other servers");

            // passive replication strategy
            if (command.isSentByClient())
            {
                if (command.getType() == "CREATE" || command.getType() == "JOIN" || command.getType() == "CLOSE")
                {
                    foreach (string serverURL in this.servers)
                    {
                        // TODO Asynchronous calls maybe a better idea
                        if (serverURL != this.url)
                        {
                            try
                            {
                                ServerInterface server = (ServerInterface)Activator.GetObject(typeof(ServerInterface), serverURL);
                                switch (command.getType())
                                {
                                case "CREATE":
                                    command.setSentByClient(false);
                                    CreateRemoteAsyncDelegate RemoteDel = new CreateRemoteAsyncDelegate(server.execute);
                                    IAsyncResult RemAr = RemoteDel.BeginInvoke((CreateCommand)command, null, null);

                                    // server.execute((CreateCommand)command);
                                    break;

                                case "JOIN":
                                    command.setSentByClient(false);
                                    JoinRemoteAsyncDelegate RemoteDel2 = new JoinRemoteAsyncDelegate(server.execute);
                                    IAsyncResult            RemAr2     = RemoteDel2.BeginInvoke((JoinCommand)command, null, null);

                                    // server.execute((JoinCommand)command);
                                    break;

                                case "CLOSE":
                                    command.setSentByClient(false);
                                    CloseRemoteAsyncDelegate RemoteDel3 = new CloseRemoteAsyncDelegate(server.execute);
                                    IAsyncResult             RemAr3     = RemoteDel3.BeginInvoke((CloseCommand)command, null, null);

                                    // server.execute((CloseCommand)command);
                                    break;

                                default:
                                    break;
                                }
                            }
                            catch (Exception)
                            {
                                Console.WriteLine(serverURL + " FAULT");
                                // Faults tolerance TODO
                            }
                        }
                    }
                }
            }
        }
Exemple #26
0
        public InjectionEntryPoint(
            EasyHook.RemoteHooking.IContext context,
            string channelName)
        {
            _server = EasyHook.RemoteHooking.IpcConnectClient <ServerInterface>(channelName);

            // If Ping fails then the Run method will be not be called
            _server.Ping();
        }
Exemple #27
0
        public void TestSetBadCertificateHandler()
        {
            Func <string, bool> func = (message) =>
            {
                Assert.IsFalse(String.IsNullOrWhiteSpace(message));
                return(true);
            };

            ServerInterface.SetBadCertificateHandler(func);
        }
Exemple #28
0
        public void Inject(string processName)
        {
            if (Injected)
            {
                return;
            }

            var process = Process.GetProcessesByName(processName)
                          .FirstOrDefault() ?? throw new AppException($"无法找到正在运行的 {processName} 应用.");

            if (!RemoteHooking.IsAdministrator)
            {
                // Please run the program as an administrator
                throw new AppException("请以管理员身份运行程序.");
            }

            if (Parameter.DirectXVersion == DirectXVersion.Unkonwn)
            {
                Parameter.DirectXVersion = GetCurrentDirectXVerion(process);
            }
            logger.Info($"Current DirectX version is {Parameter.DirectXVersion}.");

            var injectionLibrary = typeof(InjectEntryPoint).Assembly.Location;

            var server = new ServerInterface(logger);

            string channelName = null;

            RemoteHooking.IpcCreateServer(
                ref channelName, System.Runtime.Remoting.WellKnownObjectMode.Singleton, server);
            Parameter.ChannelName = channelName;

            try
            {
                logger.Info($"Attemption to inject into process {process.ProcessName}({process.Id})");

                RemoteHooking.Inject(
                    process.Id,
                    injectionLibrary,
                    injectionLibrary,
                    Parameter
                    );

                Injected    = true;
                this.server = server;
            }
            catch (Exception ex)
            {
                logger.Error("There was an error while injecting into target:", ex);
            }

            // 锁头
            Detect(process.MainWindowHandle);
            screenCapture.SetForegroundWindow(process.MainWindowHandle);
        }
Exemple #29
0
        public override RequestStatus ModifyMarketOrderRequest(MarketOrder order)
        {
            var status = ServerInterface.ModifyMarketOrder(order)
                ? RequestStatus.OK : RequestStatus.ServerError;

            if (status == RequestStatus.OK)
            {
                SendRequest(order, "modify");
            }
            return(status);
        }
Exemple #30
0
        private void connectToServer(int port)
        {
            TcpChannel channel = new TcpChannel(port);

            ChannelServices.RegisterChannel(channel, false);
            serverInterface = (ServerInterface)
                              Activator.GetObject(typeof(ServerInterface),
                                                  "tcp://localhost:8086/ServerObject");
            clientObject = new ClientObject(this, serverInterface);
            RemotingServices.Marshal(clientObject, "ClientObject",
                                     typeof(ClientObject));
        }
 internal void CvarValue(Edict.Native *pEnt, string value)
 {
     try
     {
         ServerInterface.CvarValue(EntityDictionary.EdictFromNative(pEnt), value);
     }
     catch (Exception e)
     {
         Log.Exception(e);
         throw;
     }
 }
 internal void CvarValue2(Edict.Native *pEnt, int requestID, string cvarName, string value)
 {
     try
     {
         ServerInterface.CvarValue2(EntityDictionary.EdictFromNative(pEnt), requestID, cvarName, value);
     }
     catch (Exception e)
     {
         Log.Exception(e);
         throw;
     }
 }
Exemple #33
0
        public void ImAlive(int tServerId, string address)
        {
            _timers[tServerId].Interval = TIMEOUT;
            if (!_transactionalServers.ContainsKey(tServerId))
            {
                _transactionalServers.Add(tServerId, address);
            }

            ServerInterface server = (ServerInterface)Activator.GetObject(typeof(ServerInterface), address);

            Console.WriteLine("server " + tServerId + " says: ALIVE");
        }
Exemple #34
0
        public void TestBadCertificateHandler()
        {
            var ran = false;

            ServerInterface.SetBadCertificateHandler(_ =>
            {
                ran = true;
                return(true);
            });
            ServicePointManager.ServerCertificateValidationCallback(this, new System.Security.Cryptography.X509Certificates.X509Certificate(), new System.Security.Cryptography.X509Certificates.X509Chain(), System.Net.Security.SslPolicyErrors.RemoteCertificateChainErrors);
            Assert.IsTrue(ran);
        }
Exemple #35
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.login(username, password);
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.ReceiveMeasurement(measurement, physicianName, sessionType, username);
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.recievePacketHistory(List, username);
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.receivePacketSession(this);
 }
Exemple #40
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.AddUser(user,physicianName);
 }
Exemple #41
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.ChatMessage(sender, receiver, message);
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.receiveChatPacket(this);
 }
Exemple #43
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.Broadcast(sender, message);
 }
Exemple #44
0
 public virtual void handleServerSide(ServerInterface serverInterface)
 {
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.SaveWerkbon(werkbon);
 }
Exemple #46
0
 public void Connect(String username, String server, int port)
 {
     this.servInterface = new ServerInterface(username, server, port);
     this.simulators = new List<Simulator>();
     this.refreshSimsList();
 }
Exemple #47
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.SaveData();
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.AddUser(user);
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.NewUsers(users);
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.GetWerkbonnen();
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.GetUsers();
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.recieveLoadFile(this);
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.receivePacketBicycleCommand(this);
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.sendMeasurementList();
 }
Exemple #55
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.ReceiveMeasurement(measurement, physicianName, training);
 }
 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;
 }
Exemple #57
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.GiveUser(username, allUsers, physicianName);
 }
Exemple #58
0
 public EgonServer(string releasePath)
 {
     this.servInterface = null;
     this.releasePath = releasePath;
 }
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.NewWerkbonnen(werkbonnen);
 }
Exemple #60
0
 public override void handleServerSide(ServerInterface serverInterface)
 {
     serverInterface.BikeValues(power, time, distance, username);
 }