- Dec 4, 2017
- 93
- 200
Oh yeah. I'm totally planning to pick this back up in a year or so when the content is actually implemented. Right now most of the grind is there, but not too much of the payoff.Secret bdsm club, school bsdm training ground, bdsm house cave. People might be whining about the lack of content in Glamour, but the future looks bright.
If his server binds to INADDR_ANY how it is supposed to notify the client which port it chose?Instead of binding to 3000 he should bind to 0 to get a random socket from the OS. There are other details.
You must be registered to see the links
Or do the bind in the client, tell the server what the port is on the command line, and have the server connect to the client.If his server binds to INADDR_ANY how it is supposed to notify the client which port it chose?
Port 3000 is not assigned to anything else so it's not a terrible option. I personally usually go for more oddball port numbers to reduce the chance of collision, but it's not necessary.
What I suspect may be happening is that the server is buggy and sometimes it gets wedged at startup. When this happens people kill their game and try to restart, but the server doesn't shut down properly so it sits on the port until their machine is rebooted.
To test this theory, next time the game fails to start quit the client and open a cmd prompt to run a "netstat -an" and look for a line with "0.0.0.0:3000" or "127.0.0.1:3000" in it. If that line says "LISTEN" then there's still a server running and sitting on the port. If it is in one of the WAIT states then DS forgot to set SO_REUSEPORT on his socket and you have to wait for the OS to time it out (5 minutes I think) before it can be used again.
It also wouldn't hurt to check task manager and see if there is a glamour_server.exe sitting there.
What does that even mean, how do i fix it? I cant even save in Version 10saves are encrypted
That would require a bit of work on the client and server side to reverse the normal client/server connection. It's far from impossible, but there are easier solutions.Or do the bind in the client, tell the server what the port is on the command line, and have the server connect to the client.
It means writing a save editor is more difficult, since you'd have to figure out how the game is encrypting/decrypting the data and duplicate that.What does that even mean, how do i fix it? I cant even save in Version 10
It's actually very simple, and bullet-proof. If the magic command-line option is there you do a connect to the provided port instead of a bind/listen.That would require a bit of work on the client and server side to reverse the normal client/server connection. It's far from impossible, but there are easier solutions.
Personally I take issue with the fact it's port 3000 - the default port used in tutorials and examples for Express. Unfortunately there are tons of programs written with NW.js/Electron that use Express and stick with the default port, that's how I noticed the collision ..If his server binds to INADDR_ANY how it is supposed to notify the client which port it chose?
Port 3000 is not assigned to anything else so it's not a terrible option. I personally usually go for more oddball port numbers to reduce the chance of collision, but it's not necessary.
What I suspect may be happening is that the server is buggy and sometimes it gets wedged at startup. When this happens people kill their game and try to restart, but the server doesn't shut down properly so it sits on the port until their machine is rebooted.
To test this theory, next time the game fails to start quit the client and open a cmd prompt to run a "netstat -an" and look for a line with "0.0.0.0:3000" or "127.0.0.1:3000" in it. If that line says "LISTEN" then there's still a server running and sitting on the port. If it is in one of the WAIT states then DS forgot to set SO_REUSEPORT on his socket and you have to wait for the OS to time it out (5 minutes I think) before it can be used again.
It also wouldn't hurt to check task manager and see if there is a glamour_server.exe sitting there.
In single mode you shut down the listen socket while you have a connection and quit when that connection drops. In multi mode you keep the listen socket open. Hopefully that's what he's doing now. To do reverse-connect, instead of listening and shutting that socket down when you get a connection, you connect back to the client. Everything you do with the socket after that point is the same.The issue is that the glamor server is almost certainly a multiple dispatch server (it's designed to handle hundreds of clients on the internet). You'd have to bypass all of that in the client mode. Far from impossible, but it means breaking some of the encapsulation and kind of a mess. Also have to configure the client to listen to the socket instead of initiating the connection.
Also, people will accuse you of failing to learn the lessons of FTP or Xwindows, although they mostly don't apply in this case.
Wow, I didn't see that. Thankcheck load menu. There you have x/12 quests