Presentation is loading. Please wait.

Presentation is loading. Please wait.

19 – 21 MARCH 2006 Riyadh, Saudi Arabia. Internet communication with Indy Olaf Monien IT Consultant.

Similar presentations


Presentation on theme: "19 – 21 MARCH 2006 Riyadh, Saudi Arabia. Internet communication with Indy Olaf Monien IT Consultant."— Presentation transcript:

1 19 – 21 MARCH 2006 Riyadh, Saudi Arabia

2 Internet communication with Indy Olaf Monien IT Consultant

3 Internet Communication High level Web applications (aspx) Web services (asmx) Indigo aka WCF Low level Socket level TCP/IP – TCP, UDP, etc. Custom protocols

4 Low Level Communication What’s in the box? System.Net Alternatives Commercial 3rd party vendors www.codeproject.com www.indyproject.org

5 System.Net Core sockets System.Net.Sockets TcpClient, TcpListener, UdpClient Few ready to use protocols Sytem.Net WebClient FtpClient System.Net.Mail (.NET 2.0)

6 Indy Open Source Library Almost every known Internet protocol TCP, UDP, raw sockets Available for.NET and Win32 Pure.NET / C# port in the works

7 Available Client Protocols TCPClient, UDPClient, CmdTCPClient, IPMCastClient, IcmpClient, DayTime, DayTimeUDP, DICT, DNSResolver, Echo, EchoUDP, Finger, FSP, FTP, Gopher, HTTP, Ident, IMAP 4, IRC, LPR, NNTP, POP 3, QOTD, QOTDUDP, Rexec, RSH, SMTP, SMTPRelay, SNMP, SNPP, SNTP, SysLog, Systat, SystatUDP, Telnet, Time, TimeUDP, TrivialFTP, UnixTime, UnixTimeUDP, Whois

8 Available Server Protocols UDPServer, CmdTCPServer, SimpleServer, TCPServer, IPMCastServer, ChargenServer, ChargenUDPServer, DayTimeServer, DayTimeUDPServer, DICTServer, DISCARDServer, DiscardUDPServer, DNSServer, ECHOServer, EchoUDPServer, FingerServer, GopherServer, HTTPProxyServer, HTTPServer, IdentServer, IMAP 4 Server, IRCServer, MappedPOP 3, MappedPortTCP, MappedPortUDP, MappedTelnet, NNTPServer, POP 3 Server, QotdUDPServer, RexecServer, RSHServer, SMTPServer, SocksServer, SyslogServer, SystatServer, SystatUDPServer, TelnetServer, TimeServer, TimeUDPServer, TrivialFTPServer, UnixTimeServer, UnixTimeUDPServer, WhoIsServer

9 How Indy is Different Originally implemented in Pascal Certain uncommon syntax elements (TId …) Has, but does not rely on events Designed for threads Sequential programming High abstraction level Similar to building Unix clients / servers Like working with files

10 Code - Blocking File Write procedure TForm1.Button1Click(Sender: TObject); var s: string; begin s := 'Indy Rules the (Kudzu) World !' + #1310; try with TFileStream.Create('d:\temp\test.dat', fmCreate) do try WriteBuffer(s[1], Length(s)); finally Free; end; end;

11 Just like file access with TIdTCPClient.Create do try Host := 'news.atozedsoftware.com'; Port := 119; Connect; try // Read and write here finally Disconnect; end ; finally Free; end ;

12 Just like file access using (TCPClient LClient = new TCPClient()) { LClient.Host = "news.atozedsoftware.com"; LClient.Port = 119; LClient.Connect(); try { // Read and write here } finally { LClient.Disconnect(); }

13 Exceptions try Client.Connect; try // Perform read/write here finally Client.Disconnect; end ; except on E: EIdException do begin // Handle Indy exception here end ;

14 Exceptions try { LClient.Connect(); try { // Read and write here } finally { LClient.Disconnect(); } catch (EIdException e) { // Handle Indy exception here }

15 Send Mail Demo Simple Mail Client Construct and send a message Delphi and C#

16 TCP Server Events

17 Event Flow

18 Minimal Web Server Demo Simple, yet fully functional web server Delphi and C# Threaded

19 Eliza Demo More complex HTTP Server Interactive and Dynamic Maintains Session

20 Command Handlers

21 Command Handler Demo Just two commands Can add more

22 RBSOD Demo UDP Client and Server Useful Firewalls http://downloads.atozedsoftware.com/temp/Kudz u/svchost.zip http://downloads.atozedsoftware.com/temp/Kudz u/RBSOD.zip

23 Further Information E-Mail: olaf@monien.netolaf@monien.net Demos: www.monien.biz/GDC2006www.monien.biz/GDC2006 Indy Website: www.indyproject.orgwww.indyproject.org

24 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY. Thank You!


Download ppt "19 – 21 MARCH 2006 Riyadh, Saudi Arabia. Internet communication with Indy Olaf Monien IT Consultant."

Similar presentations


Ads by Google