|
GIS
Regex Trainer
C# - Numbers written as Words
TCP/IP with C#
Select your language:
|
 |
TCP/IP with C#
As you may already know, .NET platform offers enhanced possibilities to use standard protocols, like HTTP or HTTPS. What
about the other protocols? Is it possible to implement an existing protocol which is not "natively" supported in the .NET
platform?
As you may expect, the answer is yes. You may download this C# sample which implements a limited
IRC client. It can only send messages to a channel.
To send IRC messages from your application, just make visible to your program my IRCClient class. Then, as you can see from my sample,
enter in your program the following snippet:
IRCClient c = new IRCClient("205.134.243.50", 6667,
"Noticer07", "noticer", "the one who notice",
"irc.gamesnet.net", true);
c.JoinChannel("#games");
Thread.Sleep(3000);
c.ChannelMessage("#games", "Hello everybody!");
Thread.Sleep(3000);
c.PartChannel("#games");
Thread.Sleep(3000);
c.Quit();
To do on this project:
- Trigger when output arrives, so the delays before receiving will became deprecated. This will also bring more performance.
- Interpret the received data, using the IRC RFC 2812 in order to detect logical errors like:
duplicated user name, forbidden to enter the channel, cannot send the message because the channel is moderated. This will bring more reliability.
|
 |