Mina and timetask of a dog's day make me unable to stand for low IQ, but I think that it can represent the typical waste PM of all human beings. I chose Mina if I didn't clean my ass. As a waste that has never been written in Java, I don't know where to say it, just pat my ass and select Mina. Then, when something goes wrong, I will shirk my responsibility to others, why can this waste be so awesome?
Let's talk about how Mina closes a socket. Yes. Mina does not support this simple spam operation !!! I am the idiot Mina architect andProgramClerk, don't think it's a shit. You can write some junk stuff.Code.
First, to close the socket, you need to find the socket from Java. NiO. The Spam of this dog day comes from niosocketsession, which is generated through newsession of niosocketctor.
This spam session is not returned even when it is started, but when it is connected,
Abstractioconnector. Connect
Abstractpollingioconnector. Connect0 -- "t session = newsession (processor, handle );
Niosocketconnector. Newsession finally finds the new operation on this dog day.
So what is the returned garbage future? In connect0:
Connectfuture future = new defaultconnectfuture ();
Initsession (Session, future, sessioninitializer );
It turns out to be an attribute in the session. I rely on your grandmother. In addition, the most disgusting thing is that there are sessions in the future. The structure of mutual possession is basically an idiot architecture.
The core problem is niosocketsession. Now we need to see where to close the socket.
Niosocketsession. getchannel-"
Nioprocessor. destory () =>
Abstractpollingioprocessor. destory ()
Abstractpollingioprocessor. removenow ()-> removesessions-> processor. Run
Basically, the method for seeking to close the channel fails.
Looking for socket. Close in the Code is basically dumbfounded. Not found.
Find socketchannel. Close->
Niosocketconnector. Close ()->
Finally, we found abstractpoolingioconenctor. Cancel ()
I rely on it. After a long time, I still cannot find how to close the socket. Help !!!!!!!!!!!!!