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 

TIdUDPClient and TIdUDPServer

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Harald
Guest





PostPosted: Thu Jan 20, 2005 3:23 pm    Post subject: TIdUDPClient and TIdUDPServer Reply with quote



Is it not possible to send a message with TIdUDPClient and then receive the
answer with a TIdUDPServer that is listening on a specific port?

I am using Delphi 7 and Indy 9

/HK


Back to top
Martin James
Guest





PostPosted: Thu Jan 20, 2005 3:35 pm    Post subject: Re: TIdUDPClient and TIdUDPServer Reply with quote



Quote:
Is it not possible to send a message with TIdUDPClient and then receive
the
answer with a TIdUDPServer that is listening on a specific port?

I am using Delphi 7 and Indy 9


Sure, that's what they do - transfer datagrams Is there a problem?

Rgds,
Martin






Back to top
Harald
Guest





PostPosted: Thu Jan 20, 2005 4:09 pm    Post subject: Re: TIdUDPClient and TIdUDPServer Reply with quote



"Martin James" <mjames_falcon (AT) dial (DOT) pipex.com> skrev i en meddelelse
news:41efcf36 (AT) newsgroups (DOT) borland.com...
Quote:
Is it not possible to send a message with TIdUDPClient and then receive
the
answer with a TIdUDPServer that is listening on a specific port?

I am using Delphi 7 and Indy 9


Sure, that's what they do - transfer datagrams Is there a problem?

Yes, I dont know how to do it :)

I want to send a datagram to a remote server with TIdUDPClient, then that
remote server will send a reply back to me, but how do I tell the remote
server that it should send the reply on a specific port. The port I want the
reply on is the port I have set in the TIdUDPServer.

Right now when I send a datagram the port the remote server is told to send
the reply to is just a "randomly" selected port.

/HK



Back to top
Martin James
Guest





PostPosted: Mon Jan 24, 2005 12:25 pm    Post subject: Re: TIdUDPClient and TIdUDPServer Reply with quote

Quote:
I want to send a datagram to a remote server with TIdUDPClient, then that
remote server will send a reply back to me, but how do I tell the remote
server that it should send the reply on a specific port. The port I want
the
reply on is the port I have set in the TIdUDPServer.

One immediately obvious way is to send the port number in the datagram.

Quote:
Right now when I send a datagram the port the remote server is told to
send
the reply to is just a "randomly" selected port.

Make it non-random?? :)

Rgds,
Martin



Back to top
Harald
Guest





PostPosted: Mon Jan 24, 2005 4:22 pm    Post subject: Re: TIdUDPClient and TIdUDPServer Reply with quote

"Martin James" <mjames_falcon (AT) dial (DOT) pipex.com> skrev i en meddelelse
news:41f4e89b (AT) newsgroups (DOT) borland.com...
Quote:
I want to send a datagram to a remote server with TIdUDPClient, then that
remote server will send a reply back to me, but how do I tell the remote
server that it should send the reply on a specific port. The port I want
the
reply on is the port I have set in the TIdUDPServer.

One immediately obvious way is to send the port number in the datagram.

Right now when I send a datagram the port the remote server is told to
send
the reply to is just a "randomly" selected port.

Make it non-random?? Smile

I found a way, like this:

IdUDPClient1.Binding.Port:=12452; // or some other portno.
IdUDPClient1.Binding.Bind;

just before I call SendBuffer

/HK



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock 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.