Flowdock
getpeername() public

No documentation

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

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

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