开发者

Sending message from one PC to another PC using IP address

开发者 https://www.devze.com 2023-03-25 18:53 出处:网络
I want to send a message from one computer (server) to another computer (client). Both the client and server are on an internal network with different IP addresses.

I want to send a message from one computer (server) to another computer (client). Both the client and server are on an internal network with different IP addresses.

How do I s开发者_开发百科end the message using the IP address without using the command prompt?


You need to look at socket programming.


Here is list of good tutorials that does what you are after:

How to use Sockets in C#

TCP/IP Chat

Simple TCP/IP Chat client/server

Creating a Mutli-User TCP Chat Application

The Microsoft link (the last one) is in VB.Net, but you can use the Code Convertor tool to help convert it to C#.

Also, there is the Lidgren Network library that is very easy to use.


You need to have a look at System.Net.Sockets namespace. What you're asking is very vague and it doesn't appear that you have investigated all that well. Sockets allow you to connect to other machines (and listen for incoming connections appropriately) and pass data between the two.

0

精彩评论

暂无评论...
验证码 换一张
取 消