我想製作一個程序,它像一個即時通訊工具,我已經完成,但我不知道如何發送/接收字符串到特定的IP地址。C#:如何發送/接收字符串到本地網絡中的特定IP地址
我包括我自己在那裏這東西屬於一種方法:
//is called every second and when you commit a message
public void Update(ref eStatus prgmStatus, ref eProfile userProfile)
{
UpdateUI(ref prgmStatus);
[ Some other Update Methods ]
[ Catch the string and add it to userProfile.CurrentChatHistory]
}
public void EnterText(object sender, EventArgs e)
{
_usrProfile.CurrentChatHistory.Add(chatBox.Text);
[ send chatBox.Text to IP 192.168.0.10 (e.g.) ]
}
我想用一個客戶端到客戶端系統無需任何額外的服務器軟件運行。
我可以使用哪些系統命名空間和方法來實現此目的?
Google上的第一個結果:http://www.codeproject.com/Articles/12893/TCP-IP-Chat-Application-Using-C – Nasreddine
Internet上有很多關於C#的網絡教程。 –
這沒什麼用,因爲我的程序是客戶端客戶端的客戶端,沒有任何服務器 – Paedow