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 

Routing messages

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





PostPosted: Tue Aug 22, 2006 4:40 pm    Post subject: Routing messages Reply with quote



using TIdUDPServer - OnUDPRead event:
will the data be routed to the client that has sent it (if it doesn't have a
real IP address) by using the ABinding.SendTo(ABinding.PeerIP,
ABinding.PeerPort, cmd, SizeOf(cmd)); method ?
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Tue Aug 22, 2006 10:47 pm    Post subject: Re: Routing messages Reply with quote



"Mirakq" <ak_47 (AT) abv (DOT) bg> wrote in message
news:44eaed36 (AT) newsgroups (DOT) borland.com...

Quote:
using TIdUDPServer - OnUDPRead event:
will the data be routed to the client that has sent it (if it doesn't have
a
real IP address) by using the ABinding.SendTo(ABinding.PeerIP,
ABinding.PeerPort, cmd, SizeOf(cmd)); method ?

The PeerIP is always the real IP address of the sender. If the client is
behind a router, then the router is the Sender that TIdUDPServer will see,
so the IP will be the router's IP. As such, the router would need to have
port forwarding configured in order to deliver inbound data to the
appropriate client.


Gambit
Back to top
Miraka
Guest





PostPosted: Wed Aug 23, 2006 1:57 am    Post subject: Re: Routing messages Reply with quote



"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote in message
news:44eb43f1 (AT) newsgroups (DOT) borland.com...
Quote:

"Mirakq" <ak_47 (AT) abv (DOT) bg> wrote in message
news:44eaed36 (AT) newsgroups (DOT) borland.com...

using TIdUDPServer - OnUDPRead event:
will the data be routed to the client that has sent it (if it doesn't
have
a
real IP address) by using the ABinding.SendTo(ABinding.PeerIP,
ABinding.PeerPort, cmd, SizeOf(cmd)); method ?

The PeerIP is always the real IP address of the sender. If the client is
behind a router, then the router is the Sender that TIdUDPServer will see,
so the IP will be the router's IP. As such, the router would need to have
port forwarding configured in order to deliver inbound data to the
appropriate client.


Gambit



I understand that but it should be possible to for the server just to reply
through the open socket or something (without port forwarding because the
sysadmin should be a friend of yours to forward a port to your inner
address).
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Aug 23, 2006 3:41 am    Post subject: Re: Routing messages Reply with quote

"Miraka" <ak_47 (AT) abv (DOT) bg> wrote in message
news:44eb6fc1$1 (AT) newsgroups (DOT) borland.com...

Quote:
I understand that but it should be possible to for the
server just to reply through the open socket

That is exactly what the code you showed earlier is actually doing - sending
a reply back to the PeerIP/PeerPort where the incoming data actually came
from. Whether or not that PeerIP/PeerPort cooresponds to an actual client,
or to a router sitting in front of the client, does not make any difference
at all to the server when sending back the reply. If a router is involved,
then as far as the server is concerned, the router *is* the client. What
the router does on its end to make sure the reply data reaches the real
client is outside the server's knowledge or control. Just send the data to
the PeerIP/PeerPort normally, and let the router handle the rest on its end.

Quote:
without port forwarding

The only way to send data to a client through a router without using port
forwarding is if the router has been put into DMZ mode, where all inbound
data is immediately forwarded to the client machine without any other
routing rules applied. Otherwise, you must use port forwarding. That is
the only way routers can know which client machine to forward inbound data
to on a per-packet basis.

Quote:
because the sysadmin should be a friend of yours to forward a port to your
inner address


Sorry, but port forwarding and DMZ are the only two options in order to get
the data through a router.


Gambit
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.