TCPSocket to ipv6

Hello,

I’m trying to connect to a proprietary server that only operates on ipv6, but TCPSocket throws an error whenever I issue the connect command. Are there any tricks to connecting via ipv6 that we need to know about?

Try using IP to connect?
Does dns give IPv4 or IPv6 for the domain?

There is no domain, I am trying to connect to ::1.

I am getting 103 “Name resolution error.”

Are you using TCPSocket or Xojo.Net.TCPSocket?

I’m using a TCPSocket that I placed onto my window. Can I do that with a Xojo.Net.TCPSocket?

Hmm. Per the docs, Xojo.Net.TCPSocket is iOS only. My target is Windows (and possibly Mac).

Unfortunately there isn’t support for IPv6 in TCPSocket yet. It’s being tracked as case #18253 in Feedback.

Are there any workarounds to connect to IPv6 in Xojo desktop? I’m racking my brain and drawing a blank.

You could use MBS CURL Plugin.

Unfortunately the server app is using a proprietary binary command protocol, so CURL is not an option. It’s looking like I will have to either write this in a different language or ask the client to implement IPv4.

If I remember correctly, you can use CURL to connect only and than get the socket handle.

I could add you a send/Receive method there, so you can read/write to the connected socket.

I added ReceiveData method for next plugin version.
Works already well here. Let CURL do the connect via SSL and Proxy and than just send data.
Could also be used for telnet stuff.

Perhaps a proxy can help here? Ipv4 to ipv6?

[quote=322933:@Christian Schmitz]I added ReceiveData method for next plugin version.
Works already well here. Let CURL do the connect via SSL and Proxy and than just send data.
Could also be used for telnet stuff.[/quote]

Wow! Thank you! This is a fantastic and well-thought-out workaround until Xojo implements IPv6.

A good thought if this was just for my use, but I don’t want to furnish my client with an application that requires them to run a third-party proxy server to operate. Thanks for the suggestion though!

Email me and I can send you a copy to test.