delphi

Chat application with Delphi source

knoen 2012. 11. 17. 09:07


브로드 캐스트에 관해..


Chat application with Delphi source
Full Delphi source code to a simple Chat application. Learn how UDP (User Datagram Protocol) broadcast can be used to find partners with unknown IP addresses in the network.
 More of this Feature
• Chat SOURCE CODE
 Join the Discussion
"Post your views, comments, questions and doubts to this article."
Discuss!
 Related Resources
• Internet/Network Programming
• Indy programming
• Free source Delphi apps.

Article written by Michael Schnell

Everybody doing some sockets programming is quite familiar with TCP. Most do know UDP and think it's an inferior protocol, as it does not ensure that the data bytes sent will arrive at the other site. Thus, UDP imposes less network overhead than TCP and gives the programmer more freedom and more labor by forcing him to deal with the security of the data transport himself. 
But there are more UDP vs. TCP differences than obvious at the first sight.

Let's UDP Chat!
The example Chat program demonstrates how UDP broadcast can be used to find partners with unknown IP addresses in the network. While the "chat" application is a good candidate to use the "streaming" structure of TCP, here a UDP implementation is done. Provided the "connectionless" ways of UDP, multiple partners can send to a single network device. 
The implementation shown only allows to send an answer to the sender of the last message, or to type in the recipient's IP address or host name (try "localhost" here). A nice enhancement would be to implement a way of selecting the addressee from the list of received messages.

Delphi UDP Chat in action


'delphi' 카테고리의 다른 글

dkssudgktpdy를 안녕하세요로 변환  (0) 2013.11.19
handling dblclicked string_grid cell  (0) 2013.05.23
한글 자소  (0) 2013.01.01
IE toolbar , backspace  (0) 2012.12.02
ie 툴바  (0) 2012.11.23