[Release] SocketSystem using SocketAsyncEventArgs

06/11/2012 03:45 Zeroxelli#16
Quote:
Originally Posted by CptSky View Post
A C++/CLI DLL that will wrap the WinAPI sockets in a managed class that you call in C#. The use of the GC will be minimal.
Minimal, but it will still be called, which isn't what we both were referring to. It's rather difficult/tedious to completely eradicate the GC system from any .NET based language. Microsoft isn't "about" letting the developer fully control things coded in their languages.
06/11/2012 03:48 CptSky#17
Quote:
Originally Posted by Zeroxelli View Post
Minimal, but it will still be called, which isn't what we both were referring to. It's rather difficult/tedious to completely eradicate the GC system from any .NET based language. Microsoft isn't "about" letting the developer fully control things coded in their languages.
It is impossible. It would require a compiler that compile native code from the C# source and not CIL code. Also, it would require a memory management prediction and/or a delete call to control the memory. But the solution I said is good in the point that all the socket I/O will be performed on native code and only the buffer would/could be passed to the managed program.

Quote:
Originally Posted by 12tails View Post
@CptSky
But about the ping thing..... the maximum i get is 70 using local connection, with an external i'm reaching 300-400....
Meh! I don't know why, but when I used your socket, the ping was really high...
06/11/2012 03:54 Zeroxelli#18
Quote:
Originally Posted by CptSky View Post
It is impossible. It would require a compiler that compile native code from the C# source and not CIL code. Also, it would require a memory management prediction and/or a delete call to control the memory. But the solution I said is good in the point that all the socket I/O will be performed on native code and only the buffer would/could be passed to the managed program.



Meh! I don't know why, but when I used your socket, the ping was really high...
That's true. I suppose any improvements are good, especially in the way of bringing it to a lower level language.

Also, as far as your ping goes, did you try running any tests to see how many milliseconds it takes your system to send/receive/process with your system as compared to his? It could be minor differences, or even differences in the PSI set your system is running the server under. i.e. maybe his is sse3+ and yours ran in sse/mmx?
06/11/2012 03:55 12tails#19
@CptSky
Don't worry about hehe.... i took what you said as an advice and i'll do some other tests and see what happens ;D
06/11/2012 08:52 KraHen#20
You can always PInvoke winsock functions and handle all GC related operations by yourself. But why would anyone do that?

Btw tested this as well, the ping difference between this and standard begin/end is really noticeable, although it seems to be constant for more players, so it does scale somewhat well (still wouldn`t give up 200 ms for that). In brackets, my ping was roughly 200.