It's not much of a security problem, but it could be one.
Normally the client will disconnect after authentication, because there is only one packet to handle authentication, but what if the end-user is using a proxy and keeps spamming packets (dos?). That could be a problem and you would most likely want to avoid that.
After authentication you do not want to receive anymore packets.
There is two ways to get around this.
Never call your receive method after handling the first packet received (Unless co added more packets then after last packet.) at the auth server.
Or you can simply disconnect the client, but I am not sure if last one is allowed and will cause problem for the regular client. Never tested that.
Let's rely on the first one.
I assume most people uses a receive event like this: (Or something similar.)
Code:
public static BufferEvent OnReceive;
Code:
public delegate bool BufferEvent(SocketClient sClient, DataPacket Packet);
Code:
if (SocketEvents.OnReceive.Invoke(this, receiveData))
{
Receive(); // BeginReceive
}
Code:
static bool SocketEvents_OnReceive(SocketClient sClient, DataPacket Packet)
{
// handle packets here
return false; // return true if more packets should be received
}
Not much of a security fix, but it should still be used.
This is all pseudo codes, so you have to use commonsense to actually implement something like this.






