accept()
public
Show source
static VALUE
sock_accept(VALUE sock)
{
rb_io_t *fptr;
VALUE sock2;
struct sockaddr_storage buf;
socklen_t len = (socklen_t)sizeof buf;
GetOpenFile(sock, fptr);
sock2 = rsock_s_accept(rb_cSocket,fptr->fd,(struct sockaddr*)&buf,&len);
return rb_assoc_new(sock2, rsock_io_socket_addrinfo(sock2, (struct sockaddr*)&buf, len));
}