Jump to content
RealModScene
Sign in to follow this  
dostoevsky

Xbox TCP server not persistent upon title loading?

Recommended Posts

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.  

Share this post


Link to post
Share on other sites

There is an ftp server plugin that works while games and such are loaded.. Cant remember the name of it lol

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.. 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...