C#编程-连接两台计算机的套接字编程 [英] C# Programming - Socket Programming to connect two computers

查看:168
本文介绍了C#编程-连接两台计算机的套接字编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



C#编程的新手,请帮助我解决问题

1)我想连接两台计算机
2)连接后,我应该获得任务管理器"详细信息(如果当前正在运行任何程序/文件,则应显示)

C#专家,请指导我

Hi

Am new to C# programming,please help me with the issue

1) I want to connect two computers
2) Once it is connected, I should get the "Task Manager" details (If any program/file is curently running it should display)

C# experts,please guide me

推荐答案

基本上,您需要的最小设置是客户端-服务器模型(http://en.wikipedia.org/wiki/Client-server_model [ ^ ]),其中一台计算机扮演服务器的角色,并提供与TaskManager本地提供的数据类似的数据.

理想情况下,服务器应实现为Windows服务并为客户端提供网络接口.从此处开始: http://msdn.microsoft.com/zh-CN /library/d56de412%28v=VS.100%29.aspx [我如何将byte []发送到另一台PC [ ^ ],
在局域网上与两个Windows应用程序进行通信. [^ ].

—SA
Basically, the minimal settings you need is client-server model (http://en.wikipedia.org/wiki/Client-server_model[^]) where one computer plays the role of the server and provide data similar to that provided by the TaskManager locally.

Ideally, the server should be implemented as a Windows Service and provide network interface for clients. Start here: http://msdn.microsoft.com/en-us/library/d56de412%28v=VS.100%29.aspx[^].

Network services can be provided using .NET on several different levels. It can be done on one of several different levels of networking, remoting or WPF.
Please see my overview of these approaches in my past solutions:
how i can send byte[] to other pc[^],
Communication b/w two Windows applications on LAN.[^].

—SA


这篇关于C#编程-连接两台计算机的套接字编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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