使用c#向远程PC发送消息 [英] sending message using c# to remote pc

查看:176
本文介绍了使用c#向远程PC发送消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用c#向其他pc.give me源代码发送消息。

how can i send message using c# to other pc.give me source code.

推荐答案

很明显,您不能只在任何地方发送消息 。您总是需要在两台主机上发送和接收一些应用程序。通常情况下,其中一方是Windows服务,当涉及到Windows(C#不仅用于Windows,它可以在许多不同平台上实现的CLR中使用,包括非Microsoft)。



软件的通信部分可以在不同级别创建,从原始套接字到.NET网络到WCF,自托管或不托管。我在过去的答案中提供了这些级别的简短概述:

我如何将byte []发送到其他电脑 [ ^ ],

通信b / w局域网上的两个Windows应用程序。 [ ^ ]。



您可以选择任何一种方法;它可能取决于许多因素,不仅仅是要求,甚至是你的经验和个人品味。



-SA
It''s apparent that you cannot just "send message" anywhere. You always need some applications on both hosts, sending and receiving. Typically enough, one of the sides is a Windows Service, when it comes to Windows (C# is used not only on Windows, it can be used in CLR implemented on many different platforms, including non-Microsoft).

The communication part of software can be created on different levels, from raw sockets to .NET networking to WCF, self-hosted or not. I provided short overviews of those levels in my past answers:
how i can send byte[] to other pc[^],
Communication b/w two Windows applications on LAN.[^].

You can select any of the approaches; it may depends on many factors, not only requirements, but even your experience and personal taste.

—SA


这篇关于使用c#向远程PC发送消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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