mirror of
https://github.com/Sanae6/SmoOnlineServer.git
synced 2024-11-25 04:35:18 +00:00
send server init after the client init
To make service discovery by internet scan bots harder.
This commit is contained in:
parent
dc20a9c831
commit
9511d07f09
1 changed files with 5 additions and 3 deletions
|
@ -138,9 +138,6 @@ public class Server {
|
||||||
Client client = new Client(socket) {Server = this};
|
Client client = new Client(socket) {Server = this};
|
||||||
var remote = socket.RemoteEndPoint;
|
var remote = socket.RemoteEndPoint;
|
||||||
IMemoryOwner<byte> memory = null!;
|
IMemoryOwner<byte> memory = null!;
|
||||||
await client.Send(new InitPacket {
|
|
||||||
MaxPlayers = Settings.Instance.Server.MaxPlayers
|
|
||||||
});
|
|
||||||
|
|
||||||
bool first = true;
|
bool first = true;
|
||||||
try {
|
try {
|
||||||
|
@ -206,6 +203,11 @@ public class Server {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// send server init
|
||||||
|
await client.Send(new InitPacket {
|
||||||
|
MaxPlayers = Settings.Instance.Server.MaxPlayers,
|
||||||
|
});
|
||||||
|
|
||||||
bool wasFirst = connect.ConnectionType == ConnectPacket.ConnectionTypes.FirstConnection;
|
bool wasFirst = connect.ConnectionType == ConnectPacket.ConnectionTypes.FirstConnection;
|
||||||
|
|
||||||
// add client to the set of connected players
|
// add client to the set of connected players
|
||||||
|
|
Loading…
Reference in a new issue