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.
精彩评论