允许应用程序“收听”到我的应用程序 [英] Allowing applications to "listen in" to my app

查看:66
本文介绍了允许应用程序“收听”到我的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,我希望它能够生成log

消息。然后其他应用程序可以附加到它并听取这些消息,但主要应用程序不应该担心

有多少其他应用正在监听,什么他们使用这些消息,

等。


我可以用Remoting做这个吗?


干杯,


Andy

I have an application, and I''d like it to be able to generate "log"
messages. Other applications can then attach to it and listen to
these messages, but the main application shouldn''t have to worry about
how many other apps are listening in, what they do with the messages,
etc.

Can I do this with Remoting?

Cheers,

Andy

推荐答案

5月5日,12:26,Andrew Ducker< and ... @ ducker.org.ukwrote:
On 5 May, 12:26, Andrew Ducker <and...@ducker.org.ukwrote:

我有一个应用程序,我希望它能够生成log

消息。然后其他应用程序可以附加到它并听取这些消息,但主要应用程序不应该担心

有多少其他应用正在监听,什么他们使用这些消息,

等。


我可以用Remoting做到这一点吗?
I have an application, and I''d like it to be able to generate "log"
messages. Other applications can then attach to it and listen to
these messages, but the main application shouldn''t have to worry about
how many other apps are listening in, what they do with the messages,
etc.

Can I do this with Remoting?



作为一个连接的想法 - 我可以从一个单独的应用程序连接到

应用程序的Debug.Listeners吗?


干杯,

Andy

As a connected thought - can I connect to the Debug.Listeners of an
application from a separate app?

Cheers,

Andy


Andrew Ducker pisze:
Andrew Ducker pisze:

我有一个应用程序,我希望它能够生成log

消息。然后其他应用程序可以附加到它并听取这些消息,但主要应用程序不应该担心

有多少其他应用正在监听,什么他们使用这些消息,

等。
I have an application, and I''d like it to be able to generate "log"
messages. Other applications can then attach to it and listen to
these messages, but the main application shouldn''t have to worry about
how many other apps are listening in, what they do with the messages,
etc.



看看log4net。一旦使用trace

语句对代码进行检测,就可以将其配置为将消息写入多个输出,

其中一个是多播UDP数据报。也可以将客户端可以通过telnet连接到您的进程并且

收听消息。


祝你好运!

-

Marcin Hoppe

电邮: ma ********** @ gmail.com

博客: http://devlicio.us/blogs/marcin_hoppe


5月5,8:42 am,Andrew Ducker< and ... @ ducker.org.ukwrote:
On May 5, 8:42 am, Andrew Ducker <and...@ducker.org.ukwrote:

5月5日,12:26,Andrew Ducker<和... @ ducker.org.ukwrote:
On 5 May, 12:26, Andrew Ducker <and...@ducker.org.ukwrote:

我有一个应用程序,我希望它能够生成log

条消息。然后其他应用程序可以附加到它并听取这些消息,但主要应用程序不应该担心

有多少其他应用正在监听,什么他们使用这些消息,

等。
I have an application, and I''d like it to be able to generate "log"
messages. Other applications can then attach to it and listen to
these messages, but the main application shouldn''t have to worry about
how many other apps are listening in, what they do with the messages,
etc.


我可以用Remoting做到这一点吗?
Can I do this with Remoting?



作为一个连接的想法 - 我可以从一个单独的应用程序连接到

应用程序的Debug.Listeners吗?


干杯,


Andy


As a connected thought - can I connect to the Debug.Listeners of an
application from a separate app?

Cheers,

Andy



我认为通过以下方式可以做到这一点
您的主应用程序写入msmq队列。

其他应用程序:使用光标轮询和查看队列。

I THINK it mite be possible by doing the following

your main app writes to a msmq queue.
other applications : poll and peek the queue with cursor.


这篇关于允许应用程序“收听”到我的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆