I just worked fine! Thanks a lot Francois!
Éric ----- Original Message ----- From: "Francois PIETTE" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Wednesday, October 22, 2008 2:24 PM Subject: Re: [twsocket] Silly UDP Question >> But how do I fill the TSockAddr structure to pass to SendTo? > > Out of my head, not tested: > > FDest : TSockAddrIn; > Data : AnsiString; > MyPort : Integer; > > MyPort := 1234; // Port number > FillChar(FDest, SizeOf(FDest), 0); > FDest.sin_family := AF_INET; > FDest.sin_port := WSocket_htons(MyPort); > FDest.sin_addr.s_addr := WSocketResolveHost('www.borland.com').s_addr; > WSocket1.SendTo(FDest, SizeOf(FDest), PAnsiChar(Data), Length(Data)); > > > -- > [EMAIL PROTECTED] > The author of the freeware multi-tier middleware MidWare > The author of the freeware Internet Component Suite (ICS) > http://www.overbyte.be > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be