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
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
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
On Thursday, 29 January 2015 at 15:25:09 UTC, Mike Parker wrote:
On 1/29/2015 11:40 PM, CodeSun wrote:
Recently, I found something really weird when I use strerror_t
function
which is declared inside std.c.string.
The code snippet is listed below:
import std.c.string;
import core.stdc.errno;
Recently, I found something really weird when I use strerror_t
function which is declared inside std.c.string.
The code snippet is listed below:
import std.c.string;
import core.stdc.errno;
void main() {
import std.stdio;
char[128] buf;
strerror_r(errno, buf.ptr,