Exemplo n.º 1
0
 public static void InitializeSSync()
 {
     SSyncCore.Initialize(Assembly.GetAssembly(typeof(RawDataMessage)),
                          WorldAssembly,
                          WorldConfiguration.Instance.ShowProtocolMessages);
     ProtocolTypeManager.Initialize();
 }
Exemplo n.º 2
0
Arquivo: View.cs Projeto: Skinz3/SSync
 public View()
 {
     InitializeComponent();
     Self = this;
     SSyncCore.Initialize(Assembly.GetAssembly(typeof(ChatMessage)), Assembly.GetAssembly(typeof(View)));
     Client.OnConnected       += Client_OnConnected;
     Client.OnFailedToConnect += Client_OnFailedToConnect;
     richTextBox2.KeyPress    += richTextBox2_KeyPress;
 }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            SSyncCore.OnProtocolLoaded += SSyncCore_OnProtocolLoaded;

            SSyncCore.Initialize(Assembly.GetAssembly(typeof(ChatRequestMessage)), Assembly.GetExecutingAssembly());
            StartupManager.OnItemLoading  += StartupManager_OnItemLoaded;
            StartupManager.OnStartupEnded += StartupManager_OnStartupEnded;
            StartupManager.Initialize(Assembly.GetExecutingAssembly());
            SSyncServer serv = new SSyncServer("127.0.0.1", 500);


            serv.OnClientConnected += serv_OnSocketAccepted;
            serv.Start();

loop:
            string str = Console.ReadLine();

            Clients.ForEach(x => x.Send(new ChatMessage(str)));
            Console.WriteLine(str + " Sended to clients");
            goto loop;
        }