Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Network is unreachable Datasnap over IPV6



Permlink Replies: 2 - Last Post: Oct 19, 2016 4:02 AM Last Post By: Dison Peña
Dison Peña

Posts: 17
Registered: 11/29/04
Network is unreachable Datasnap over IPV6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 17, 2016 6:30 AM
When i try to connect to a Datasnap Rest Server over a IPV6 network i get "Socket Error Network is unreachable"

I'm using TDSRestConnection to connect

in the HostName property i set my server name

XE8 Datasnap Rest Server
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: Network is unreachable Datasnap over IPV6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 18, 2016 11:08 PM   in response to: Dison Peña in response to: Dison Peña
Dison Peña wrote:

When i try to connect to a Datasnap Rest Server over a IPV6 network i get "Socket Error Network is unreachable"

I'm using TDSRestConnection to connect

in the HostName property i set my server name

XE8 Datasnap Rest Server

Datasnap uses Indy HTTP, which does not handle IPv6-only networks automatically. You may be able to get away with
enclosing the hostname in the URL with square brackets, e.g.: http://[somehost.com]/someendpoint

The problem there though is that using square brackets when there's no IPv6 network may fail.

--
Dave Nottage [MVP, TeamB]
Hints, tips and tricks at: http://www.delphiworlds.com/blog
Dison Peña

Posts: 17
Registered: 11/29/04
Re: Network is unreachable Datasnap over IPV6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 19, 2016 4:02 AM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:
Dison Peña wrote:

When i try to connect to a Datasnap Rest Server over a IPV6 network i get "Socket Error Network is unreachable"

I'm using TDSRestConnection to connect

in the HostName property i set my server name

XE8 Datasnap Rest Server

Datasnap uses Indy HTTP, which does not handle IPv6-only networks automatically. You may be able to get away with
enclosing the hostname in the URL with square brackets, e.g.: http://[somehost.com]/someendpoint

The problem there though is that using square brackets when there's no IPv6 network may fail.

--
Dave Nottage [MVP, TeamB]
Hints, tips and tricks at: http://www.delphiworlds.com/blog


You can't set a url in the hostname property of the TDSRestConnection component.

this is not allowed as host name http://[somehost.com]/someendpoint
This is allowed as host name somehost.com

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02