Am I allowed to dos attack my own server
It's called "load testing" as long as you're doing it on the up-and-up. Also, don't do this with any kind of "shared host" or "virtual slice" host -- that would be bad for others sharing the same host.
Things like this do they attack the router and isp or my server app
A distributed denial of service (flood attack) is all about choking of the narrowest pipe between you and the world. Typically, that will be between you and your ISP. Typically, the ISP and others using the ISP will also suffer. One thing ISPs can do is to temporarily cut off any traffic to your IP address from their upstream/peers.
A non-distributed denial of service typically exploit known problems in a service, such that a smaller number of connections can consume disproportionate amounts of resources. For example, if logging in consumes a lot of database resources, someone might write a script that just logs in, over and over, and thus make the database choke up and not let (many) legit users log in. Or they may send a very, very long network packet to your server, which if there's a bug, makes it run out of memory and crash the process.
I was thinking of just a time out value when up drop the client
That's usually a good idea. That being said -- I hope you're using select(), or I/O completion ports (on Windows,) or epoll/kpoll (on UNIX) rather than synchronous read() or recv() from sockets. A client connection is typically a buffer, a pointer to some client state, and a socket. Each time the socket is readable, you call recv() once into the buffer, trying to fill the buffer up. Then you inspect the buffer, and see if there's a full packet in there -- if so, decode that packet, and dispatch it, and look for another packet.
Finally, if you already have a login server, you could just spawn a new process for the room, and let the login server tunnel/forward the data to the room process, using the login server as your proxy. That way, you only need one port open to the internet.