0

I have 3 main threads in my server project.

  1. (TCP) Socket accept and client setup operations
  2. Incoming data handler (TCP&UDP) and processor (maybe login, lobby etc.)
  3. Outgoing data handler (TCP&UDP) and processor (sends data via UDP or TCP to clients..)

And I want to ask in here, is it good way to do it? Namely maybe while data processing (login) client#32 can be disconnected and in this case a new client can connect as client#32, that means he logged in without a login check (I guess, I don't know am I right?). Now can anybody tell me something about this server system?

  • 1
    Not sure what your security bug has to do with either threading or sockets. If connecting after another client disconnects allows you to steal their identity, then that is just bad design or implementation in your code. As for "is it good way" - it could be fine, if you fx the security problems. Personally I'd try to use async socket IO, but dedicated threads works well too. – Marc Gravell Jun 09 '13 at 08:35
  • @MarcGravell thanks :) I wanted to hear that. The security bug doesn't exists any more. I have fixed it already. – Mehmet Fatih Marabaoğlu Jun 09 '13 at 12:28
  • @MehmetFatihMarabaoğlu - You seem to be posting quite a bit reference creating a network library. Are you aware that something suitable may already exist? Checkout http://www.networkcomms.net and http://code.google.com/p/lidgren-network-gen3/. – MarcF Jun 10 '13 at 11:30
  • @MarcF I want to be make mine! I'll use it for my MMO project. – Mehmet Fatih Marabaoğlu Jun 10 '13 at 14:39

0 Answers0