Jump to content
  • Advertisement

Void

Member
  • Content count

    1025
  • Joined

  • Last visited

Community Reputation

126 Neutral

About Void

  • Rank
    Contributor

Personal Information

  • Interests
    Art
    Audio
    Business
    Design
    DevOps
    Production
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Oh I see my problem , I should be using DIDFT_GETINSTANCE instead of the GUID parameter in the callback, it is a different variable, I should have read the docs more clearly. Thanks for the help.
  2. I'm not in the the EnumObjects callback function, I'm shimming GetProperty function, what takes in &propRange.diph So I try to access it from the DWORD variable propRange.diph.dwObj which is assigned to instance->guidType from caller.
  3. Hmm, not so sure it works. none of the ID match in enum callback, I plugged in a xbox360 controller struct GUIDName { GUID Guid; string GuidString; }; GUIDName guidNames [] = { { GUID_XAxis, "GUID_XAxis" } ,{ GUID_YAxis, "GUID_YAxis" } ,{ GUID_ZAxis, "GUID_ZAxis" } ,{ GUID_RxAxis, "GUID_RxAxis" } ,{ GUID_RyAxis, "GUID_RyAxis" } ,{ GUID_RzAxis, "GUID_RzAxis" } ,{ GUID_Slider, "GUID_Slider" } ,{ GUID_Button, "GUID_Button" } ,{ GUID_Key, "GUID_Key" } ,{ GUID_POV, "GUID_POV" } ,{ GUID_SysMouse, "GUID_SysMouse" } ,{ GUID_SysKeyboard, "GUID_SysKeyboard" } ,{ GUID_Joystick, "GUID_Joystick" } ,{ GUID_SysMouseEm, "GUID_SysMouseEm" } ,{ GUID_SysMouseEm2, "GUID_SysMouseEm2" } ,{ GUID_SysKeyboardEm, "GUID_SysKeyboardEm" } ,{ GUID_SysKeyboardEm2, "GUID_SysKeyboardEm2" } }; for (int i = 0; i < sizeof (guidNames)/sizeof (guidNames [0]); ++i) { if (guidNames [i].Guid == MAKEDIPROP (&propRange.diph.dwObj)) cout << "---------------------------------------" << guidNames [i].GuidString << endl; }
  4. I omitted the error checking and other parts for readability, the whole that crashes is this BOOL CALLBACK EnumAxesCallback (const DIDEVICEOBJECTINSTANCE* instance, VOID* context) { DIPROPRANGE propRange; propRange.diph.dwSize = sizeof (DIPROPRANGE); propRange.diph.dwHeaderSize = sizeof (DIPROPHEADER); propRange.diph.dwHow = DIPH_BYID; propRange.diph.dwObj = instance->dwType; propRange.lMin = -1000; propRange.lMax = +1000; // ok if (FAILED (DIJoystick->SetProperty (DIPROP_RANGE, &propRange.diph))) return DIENUM_STOP; // ok if (FAILED (DIJoystick->GetProperty (DIPROP_RANGE, &propRange.diph))) return DIENUM_STOP; // crash if I try to compare GUID if (GUID_XAxis == MAKEDIPROP (propRange.diph.dwObj)) ;
  5. The == operator is overloaded by VS. For some reason, it cannot show GUID properly
  6. Hi, I'm trying to do a comparision with DirectInput GUID e.g GUID_XAxis, GUID_YAxis from a value I get from GetProperty eg DIPROPRANGE propRange; DIJoystick->GetProperty (DIPROP_RANGE, &propRange.diph); // This will crash if (GUID_XAxis == MAKEDIPROP (propRange.diph.dwObj)) ; How should I be comparing the GUID from GetProperty?
  7. I doubt so. I think it might be more of protection on 4G network. Anyway some providers works, some don't. I have more than just Enet so potentially there's a bit more work to do so hoping for existing solution. Also the proxy would be the bottleneck so it looks to me like LVS Direct Routing is still the way to go. Thanks for the replies so far.
  8. Webrtc would work because the ISP do not block the webrtc ports. In my setup, if I change the Enet servers to webrtc, I would face the same problem. Imagine each of my Enet server is webrtc, and I do not have enough public IPs, so that's my issue now. If I server the webrtc over it's non standard ports, likely the ISP would block them too.
  9. Who says it is a game ? Anyway I can't talk about it specifically but I'm looking at a much larger scale than 12K servers so public IP address is definitely not enough. I need to control the outgoing port from server because on mobile 4G network, some ISP (tested) block packets if the packets come from other ports. That's what I'm hoping to avoid doing to write my own since I have too many things to code, and see if there are existing solutions available.
  10. Yes,it is not a load balancer but rather a router that can be controlled by API. We don't have enough public IPs in the long run, we might go a lot more than 12K. I can't use a different port, it has to be same port beause of a certain requirement. I can put out a few public IPs but each IP should be covering a few hundred servers. Until IPv6, which seems it will never be implemented.
  11. Thanks for the replies. I just found too that Nginx have UDP load balancing. I'm currently using IPTables but I'm not sure how scalable it can be. I'm looking at thousands of servers. I do have some specific requirements, I need the clientA to connect specifically to a serverB, so I cannot use the load balancer to decide the routing. When the client connects, the client can make a HTTP request to a backend endpoint, which decides which server the to connect to. I'm hoping to be able to set the routing on the "load balancer" to set the routing. I'm not familiar with hardware routers but I don't think they have API to control it programtically. Currently my research points to using a software load balancer like Linux Virtual Server. Either that or I have to write my own router but I'm trying to avoid that and use existing solutions.
  12. Hi, I like to know ask to setup the network architecture for multiple servers behind a single port that is persistent. My setup is 1. Mulitple servers running Enet (UDP custom protocol). The connection are persistent. .e.g Client A connects to Server B, and the load balancer/router need to route everything. For HTTP, I can do serverA.domain.com, serverB.domain.com, which the load balancer can use host headers to route. But Enet is UDP and a custom protocol. Is there a software router to be able to do this?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!