| View previous topic :: View next topic |
| Author |
Message |
Harald Guest
|
Posted: Thu Jan 20, 2005 3:23 pm Post subject: TIdUDPClient and TIdUDPServer |
|
|
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
|
Posted: Thu Jan 20, 2005 3:35 pm Post subject: Re: TIdUDPClient and TIdUDPServer |
|
|
| 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
|
Posted: Thu Jan 20, 2005 4:09 pm Post subject: Re: TIdUDPClient and TIdUDPServer |
|
|
"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
|
Posted: Mon Jan 24, 2005 12:25 pm Post subject: Re: TIdUDPClient and TIdUDPServer |
|
|
| 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
|
Posted: Mon Jan 24, 2005 4:22 pm Post subject: Re: TIdUDPClient and TIdUDPServer |
|
|
"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??
|
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 |
|
 |
|