Weird result of getsockopt

2015-05-24 Thread CodeSun via Digitalmars-d-learn
Hello guys, Today, I found a weird problem when I was learning to enable SO_KEEPALIVE for a specific socket. I use setsockopt to enable keepalive firstly, and then use getsockopt to show if it is enabled correctly. My code snippet is listed below: Dlang version: import

Re: Weird result of getsockopt

2015-05-24 Thread CodeSun via Digitalmars-d-learn
On Sunday, 24 May 2015 at 21:11:34 UTC, Daniel Kozak wrote: On Sunday, 24 May 2015 at 16:51:44 UTC, CodeSun wrote: Hello guys, Today, I found a weird problem when I was learning to enable SO_KEEPALIVE for a specific socket. I use setsockopt to enable keepalive firstly, and then use getsockopt

Weird link error

2015-04-20 Thread CodeSun via Digitalmars-d-learn
I have test a snippet of code, and I encountered with a weird link error. The following is the demo: import std.stdio; interface Ti { T get(T)(int num); T get(T)(string str); } class Test : Ti { T get(T)(int num) { writeln(ok); } T