Пример #1
0
    void Start()
    {
        server = new HttpMessageServer("http://localhost:3141/");
        client = new HttpMessageClient("http://localhost:3141/");

        server.Subscribe <RequestSaveAllScenes>(req =>
        {
            Debug.Log($"Server Received: {req.GetType().FullName}");
        });

        client.Subscribe <RequestSaveAllScenes>(req =>
        {
            Debug.Log($"Client Received: {req.GetType().FullName}");
        });
        server.SubscribeAny(req =>
        {
            Debug.Log($"Server Received Any: {req.GetType().FullName}");
        });

        client.SubscribeAny(req =>
        {
            Debug.Log($"Client Received Any: {req.GetType().FullName}");
        });
    }