kerryjiang / SuperSocket

SuperSocket is a light weight, cross platform and extensible socket server application framework.
Apache License 2.0
3.9k stars 1.15k forks source link

Linux/OSX DontLinger not supported in corefx #146

Open raphac opened 6 years ago

raphac commented 6 years ago

Hello I use SuperSocket on Linux and have a problem there. On this line, SocketOptionName.DontLinger was used and unfortunately that is not supported by Linux. I found and wrote a comment here but nobody answered. That's why I'm trying it here. I change the code from m_ListenSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.DontLinger, true); to m_ListenSocket.LingerState = new LingerOption(enable: false, seconds: 0); and it works. Does the code do the same? If not, what's the best way to solve this problem?

chucklu commented 6 years ago

I have checked the file you provided, and the commit is as following:

commit f0b85082764bb1307d9dfb9bc6bda4a38ac53c78 (origin/v1.6, temp) Author: JerYme jeremy@fizames.name Date: Wed Feb 7 23:51:53 2018 -0500

However, the corefx version is developed under master branch. And here is a new listener based UvTcpListener which come from System.IO.Pipelines.Networking.Libuv

raphac commented 6 years ago

Thank you for your answer, but it doesn't solve my problem. I have the commit in my code, but when I run the application, I get an exception. If I replace the code as described above, then it works, but I do not know what the difference is. I have also seen the new possibility with Libuv, but it is only in the preview and I want to use some features of Supersocket 1.6 (commands, filters...).

chucklu commented 6 years ago

@raphac Did you mean that you covert the code on branch v1.6 to corefx version by yourself?

raphac commented 6 years ago

@chucklu Yes and No :-) I use SuperSocket-NetCore and I made some changes.