Broadcast from macosx to windows

Hello Everyone
I am developing an application where I am using the oscP5 library. I want to set a server from my computer (macosx) and I want other computers to connect to my server. Since the ip address is constantly changing I thought it would be better to put the name of my machine instead.
This is how it looks the client code

myBroadcastLocation = new NetAddress("theServer.local", 32000);

Maybe is a stupid question but do you know if a windows client can connect to my macosx like this?
thank in advance

Not sure what “theServer.local” is in mac. I am thinking it is the same concept as localhost?

I would think what you need to do is to set a static IP address. If you have a router, I believe you could route traffic based on the mac address (more research on that to see if it is feasible).

You could the solution above only if you are running server and client apps in the same computer.

Kf

On Mac if you go to internet Sharing in System preferences you can see what is the name of you computer, and it says : “Computers on your local network can access your computer at: in my case I give this name server.local” but usually appear like theName-MacBook-Pro.local.
Your solution is not a option since I tend to use the application in different places (always the computer in the same network same place but the place can vary) . This method using the name of the computer works between macosx but I was wondering if it works with windows?

@litiec===
in your case, instead of getting some noIP, which is useful when you want to acceed to your server from outside of the LAN, i would set manually the ip of the computer where is your server ; as for the windows pb i am sure that it is possible but not able to remember how; i ll get a look.

Hi akenaton

I’m not sure if I understood. Are you talking about static IP. If it is this is not an option since I’m going to use my application in a public space and I take the risk to some computer pickup my static Ip already. I also have to previously export the application to windows and mac so everything should be already set down in terms of coding. DO you you read my previous comment about internet Sharing in mac System preferences. Because I already test this way by putting my mane computer and it works in every space. I think it reflects back the currently ip whenever a client request a connection. But I only test it with mac to mac not mac to windows. And maybe this is not an issue anyway but I just wanted to know if someone already experience any issue. Otherwise I think I need to find someone that have a windows and test my application.

If you already have a DDNS setup, you can forcibly open ports on a router via the UPnP service, so n1 accessing your DDNS link via those ports can connect to your computer’s servers bound to those ports.

1 Like