BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

UDP socket

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General)
View previous topic :: View next topic  
Author Message
JBB
Guest





PostPosted: Fri Dec 15, 2006 9:51 pm    Post subject: UDP socket Reply with quote



How do i create UDP sockets in Delphi? ( native Delphi, not .Net)
Thanks
Back to top
Steve
Guest





PostPosted: Sun Dec 17, 2006 4:59 am    Post subject: Re: UDP socket Reply with quote



On 16/12/2006 12:51 AM, JBB wrote:
Quote:
How do i create UDP sockets in Delphi? ( native Delphi, not .Net)
Thanks
What it boils down to, is that you use the routines from the WinSock unit.


There are many things out there on the net for handling sockets, and
some will handle UDP as well as TCP sockets.

For my application I grabbed an example which was designed for TCP and
"hacked" it to use UDP. Since UDP is connectionless, the hack involved
removing some code and changing parameters to specify UDP rather than
TCP. Since most of the logic is similar between these packet types, and
because WinSock is handling the nitty gritty details, it's not a
difficult hack.

Oh, hang on a sec. I actually hacked the code I used to handle
broadcast datagrams, which are different again, but in a sense quite
similar to UDP.

he hardest trick with sockets and delphi is getting a component that
will generate events without requiring a form. The winsock rotuines
(from memory) all required a window handle if they were to generate
events. My (rather slack) approach was to create a hidden form, even in
console applications. :-(

I hope this helps, She Who Must Be Obeyed is calling me. I'll see if I
can get away to find some code and post it later...

Steve
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.