

This class should handle implementation of how exactly you want to handle Requests. Public abstract void onRequest(Request request, Connection connection) įires whenever a Request is received on the Server's end from a Client. Public abstract void onRead(Object object, Connection connection) įires whenever an Object is received on the Server's end from a Client Connection.ĭoes not fire when a Request is received, the following event handles those cases. Same as above, but fires once for each Connection in the Server's Connection list at the time of writing the Object. Public abstract void onWrite(Serializable object, Connection connection) Public abstract void onWrite(Serializable object) įired whenever an Object is written to every Connection in the Server's list of current Connections. The Exception describes the circumstances that lead to the Connection being dropped. Public abstract void onConnectionLoss(Connection connection, Exception e) įired whenever a Connection is dropped, except when the Server closes a Connection manually when its shutdown() method is called. Public abstract void onConnectionGain(Connection connection) įired whenever a Client successfully connects to the Server, providing you the Connection that was just established.


If you don't want to handle certain events, simply create a constructor for the Server/Client, but leave the blocks for the unused event blank. Implementations of the following events are not mandatory. If the Object read is a Request (covered later on), then it will be displayed through a separate designated event. When an Object is read, an event will be fired as mentioned below. Servers and Clients both always have threads open which wait for Objects to be read. Likewise every time interval the Server does the same, but for each Client Connection it has saved. Both Server and Client feature a heartbeat system, where after a certain time interval, the Client will send some info to the Server to let it know it's still alive. The implementation for a lot of the class events is abstract, meaning the user determines what he wants to do when those events fire. It's still a bit unrefined so if you have an improvement, post it and I'll consider it for revision. Anything's better than a facebook group, christ.A while back I had to create an implementation of a Server and Client communications system for a personal script of mine. If you're not inclined to sift through all the garbage, you can try reddit. Do you want good memes? Go find them on 4chan. Nobody cares about your 32767th holocaust meme. They're beating dead horses left right and centre. Overall, what I can say about the dank memes gang is this: they take good ideas and run them into the ground. The rest are either just mocking someone's appearance in a really unfunny way or overusing bass boost. Only a few are, and they're all stolen from ya boy dolan dark. And the videos that get posted there? Not funny. I've seen picnic blankets with less predictable patterns. Once again, this format and these jokes in particular can be funny, but they just aren't when repeated so much. While edgy jokes can be used well, repeating the same bloody 'black people are slaves' joke or the 'muslims are terrorists' joke gets old. Perhaps it used to be funny but it's basically just edgy jokes with no substance.

Oddly enough they consider themselves to be dank, but as someone who has been on the group since early this year their comedy has gone from little to none. Some background: the Dank memes gang is, as previously mentioned, a facebook group for posting memes. They think they're 4chan levels of dank, but it's a facebook group.
