Git Product home page Git Product logo

Comments (5)

mpope9 avatar mpope9 commented on August 22, 2024 1

Well, it looks like I was not setting the client to have an ipv6 address. Which makes sense that it has to have that, if connecting to an ipv6 server.

Follow up question 1: Are connect tokens able to have one ipv4 and one ipv6 address in them?

Follow up question 2: I haven't seen any mechanism to switch a client from ipv4 to ipv6. Would you suggest just destroying the client and creating a new one with ipv6?

from yojimbo.

mpope9 avatar mpope9 commented on August 22, 2024

And, also when I attempt to generate an ipv6 address using the matcher it comes out with every other byte reversed.

from yojimbo.

mpope9 avatar mpope9 commented on August 22, 2024

Ahh, I see why the address is 'scrambled', the htons takes care of network byte order?

Well I've whittled it down to the netcode_socket_send_packet() function. It seems that sendto fails with the errno: invalid argument.

Alittle more info, I'm running OSX.

from yojimbo.

gafferongames avatar gafferongames commented on August 22, 2024

Yes, tokens can have an IPv4 address and IPv6 address in them. They support multiple addresses. You can see the spec for connect tokens on the netcode.io project.

It has been a while since I've worked with this library, so I don't remember. But the point at which you pass the client an address, eg. "0.0.0.0" or "::0" to bind to, is where it picks IPv4 vs. IPv6.

I don't remember if this is start/stop, but if it is, then that's all you need to do.

If it's in the CTOR, then yes, you need to destroy the client and recreate it to switch addresses.

As a feature request in the future, it seems reasonable to support a dual-stack server, such that it has a socket for IPv6, and a socket for IPv4 connections simultaneously.

from yojimbo.

mpope9 avatar mpope9 commented on August 22, 2024

I see. Thank you for the reply.

from yojimbo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.