method
gethostname
v1_9_1_378 -
Show latest stable
- Class:
Socket
gethostname()public
No documentation available.
static VALUE
sock_gethostname(VALUE obj)
{
char buf[1024];
rb_secure(3);
if (gethostname(buf, (int)sizeof buf - 1) < 0)
rb_sys_fail("gethostname");
buf[sizeof buf - 1] = '\0';
return rb_str_new2(buf);
}