dostoevsky 1 Posted August 10, 2019 I've been wanting to implement a small TCP server on my RGH for a while but I've found that the server stops accepting clients once a game title has loaded. I was wondering if anyone has any idea why this may be (or even how to get around this). Relevant information is as follows: The server module is a dashlaunch plugin, it launches in a system thread. The server accepts clients just fine whilst on dashboard but no longer accepts clients when a game title is loaded. I've verified that the module isn't being unloaded or anything like that by running the "modules" command over XBDM (and looping a DbgPrint to show that the background thread can still execute whilst a game title is running, just seemingly _accept_ blocks indefinitely or does nothing). I've set the "undocumented" socket options for running the sockets unencrypted (i.e. the 0x5802 and 0x5801 flags) and, as I say, it works perfectly when just sitting on dashboard. I've even went as far as to add the "0" and "6" privileges to my xex.xml (inspired by FreestyleDash's source) - I'm not sure what these do but applied them in a last ditch effort in copying existent sources. I've come to the conclusion that some other work is involved in order to make the socket server persistent upon game loading (perhaps some kind of hook or further undocumented flags or system priority trickery). If I look at xbWatson, when a game title is launched, it says "Xbox is restarting" and I think something must be done in order to allow the bound socket (and port) to remain active once a game title has loaded. This seems like a long shot but if anyone happens to know precisely how one can get around this, I'd really appreciate to know. Similarly, if any hoarders out there happen to have a copy of nateleroux's XBDM (the one that was removed from GitHub a number of years ago) that would be equally as helpful (I've reversed various bits of it and verified that it does set the same undocumented flag etc. - but nothing I've found strikes me as a solution). Any help is much appreciated, thank you. Quote Share this post Link to post Share on other sites
felida 1653 Posted August 11, 2019 There is an ftp server plugin that works while games and such are loaded.. Cant remember the name of it lol Quote Share this post Link to post Share on other sites
dostoevsky 1 Posted August 11, 2019 9 hours ago, felida said: There is an ftp server plugin that works while games and such are loaded.. Cant remember the name of it lol Yeah, FTPd(aemon), built into FSD (if I recall correctly). I've looked into that and, from what I can see, I'm doing exactly the same things (the same flags, the same XNet startup, etc.) just mine no longer continues to accept clients when a game title is running; https://github.com/Swizzy/freestyledash/blob/4e071fa07ddf7bb4b4922f4b308febff68dad870/Freestyle/Tools/FTP/FTPServer.cpp#L74-L86 I'm honestly at a loss since there must be some tiny important detail I'm missing. Quote Share this post Link to post Share on other sites
gavin_darkglider 1562 Posted August 11, 2019 Get the dashlaunch ftp server plugin, and disable the one in aurora. it works even in game, but doesnt have the custom commands for aurora. ;) Quote Share this post Link to post Share on other sites
dostoevsky 1 Posted August 14, 2019 On 8/12/2019 at 12:32 AM, gavin_darkglider said: Get the dashlaunch ftp server plugin, and disable the one in aurora. it works even in game, but doesnt have the custom commands for aurora. I'm not wanting FTP specifically, I'm wanting a generic TCP server (that I implement) for the purpose of implementing my own custom protocols. Quote Share this post Link to post Share on other sites
felida 1653 Posted August 14, 2019 18 hours ago, dostoevsky said: I'm not wanting FTP specifically, I'm wanting a generic TCP server (that I implement) for the purpose of implementing my own custom protocols. We understand, you were talkkng about reversing stuff and there is an ftp plugin for dashlaunch that is persistent when playing a game.. Has nothing to do with fsd/aurora mate.. Quote Share this post Link to post Share on other sites
dostoevsky 1 Posted August 15, 2019 20 hours ago, felida said: We understand, you were talkkng about reversing stuff and there is an ftp plugin for dashlaunch that is persistent when playing a game.. Has nothing to do with fsd/aurora mate.. Oh, my mistake. I assumed you both were talking about the built-in FTP daemon. Thanks for the suggestion, I've reversed enough of it (the ftpdll plugin by cOz) to know that it's setting the same undocumented flags, etc. I'm truly at a loss. I'll probably just need to try reach out to some of these authors directly because I've been stuck on his issue for a week or so now. Quote Share this post Link to post Share on other sites
dostoevsky 1 Posted August 22, 2019 Update: I'm a moron. I was accidentally relying on someone else's macro-mapping to map unqualified socket functions to their NetDll_* variants. On closer inspection, I found that the precedence was being overruled by a spurious import I had added in frustration (plus the disassembly was misleading - it was mapping some functions correctly and others not). So I've just made the code explicitly call NetDll_* functions directly and not rely on the hacky macro-mapping that's in the xkelib version I have. It's working now. 1 Quote Share this post Link to post Share on other sites