getsockname() public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
static VALUE
bsock_getsockname(VALUE sock)
{
    char buf[1024];
    socklen_t len = sizeof buf;
    rb_io_t *fptr;

    GetOpenFile(sock, fptr);
    if (getsockname(fptr->fd, (struct sockaddr*)buf, &len) < 0)
        rb_sys_fail("getsockname(2)");
    return rb_str_new(buf, len);
}
Register or log in to add new notes.