Lare can you help me with an error I got with rune source?
No - the indexes of an object in a List do not stay the same when other objects are added and removed before it. The best structure for it is an array (as winterlove already uses). Elements that aren't used waste little space, contrary to what lots of people believe (it's effectively an array of pointers to players, not an array of players themselves.)
Well, if you accept a SocketChannel from a ServerSocketChannel, you can obtain the Socket of the accepted channel by calling SocketChannel.socket(). So yes, it is possible. However, you will see no performance benefit. The performance benefit of NIO is in it's scalability as opposed to IO. This is entirely based upon using a selector to determine readiness instead of thousands of threads within the JVM thread scheduler. To answer your question simply: yes it is possible to use NIO to accept incoming connections and then use IO with those accepted connections, but it will not improve your servers performance at all.
I don't know whether you can mix and match them (in NIO, (Server)SocketChannel can be used to access the corresponding (Server)Socket) but even if you can it's probably a bad idea.
and it is quite ironic you send this message right now, as I've just created a tutorial on adding a better event manager based upon cycles: http://www.rune-server.ee/runescape...k-manager.html
The EventManager is three years old... it, and lots of my other code, has already had quite an influence on private servers
Yep, why?
but sekz?
Registered Member
(Official) Thanksgiver
Banned
Extreme Donator
Father Of Lies
Super Donator