1, epoll model just check the buffer changes, acceptable, readable and writable. And blocking and nonblocking socket does not matter, right?
2, blocking socket, when data is sent if the sending 50K, 40K will not only send the data send function returns a?
3, in the epoll mode if left 40K data buffer I (blocking socket) send a 50K data, whether the data can be written to the buffer before the 40K? Then send returns, this time to get the errno is EAGAIN it? These two cases are the same socket?
4, the same when received (blocking socket), if the data buffer is only 10K, 50K, but I am receiving the data should only return 10K of data, right? EAGAIN also get this error code?
5, some question is about the use of non-blocking sockets epoll mode.
Beginner epoll, still somewhat puzzled place, after Baidu still confused, I hope you can enlighten enlighten, thank you.
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
I read your post before going to understand a bit Epoll model, I personally do not really understand this, but Epoll model follows the TCP / IP, right? ? I think that this TCP / IP protocol and some features, it should also have it ~
Reply:
Only one man upstairs to answer my question, so poor. But also thank the enthusiastic man.
Then recently a little time to look at some of the problems encountered are now calling JAVA JNI layer custom classes and interfaces, the Internet looking for a long time or not.
Posting to continue to seek help. . .
This post, I also have some of their own understanding, so I transferred through the code, and paste it again knot.
Nothing more than to help these brothers and more Dingding, there are points, thank you.
Reply:
Baidu is impossible to google it and see foreigners posts.
Reply:
The landlord is on the phone you want to write server, android on to the nio, select models have no problem ah
Reply:
NIO also want to see the next time. However, the use of hair under layers of blocking JAVA SOCKET problems. So it intends to use JNI to write. I want to use EPOLL, because now there is an efficiency issue. I want to try to use EPOLL whether it can improve efficiency.
No comments:
Post a Comment