File: C:/Ruby27-x64/share/ri/2.7.0/system/Socket/unix_server_loop-c.ri
U:RDoc::AnyMethod[iI"unix_server_loop:ETI"Socket::unix_server_loop;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"-creates a UNIX socket server on _path_. ;TI"1It calls the block for each socket accepted.;To:RDoc::Markup::BlankLine o;
; [I"RIf _host_ is specified, it is used with _port_ to determine the server ports.;T@o;
; [I"8The socket is *not* closed when the block returns. ;TI"$So application should close it.;T@o;
; [
I"GThis method deletes the socket file pointed by _path_ at first if ;TI"Othe file is a socket file and it is owned by the user of the application. ;TI"VThis is safe only if the directory of _path_ is not changed by a malicious user. ;TI"9So don't use /tmp/malicious-users-directory/socket. ;TI"lNote that /tmp/socket and /tmp/your-private-directory/socket is safe assuming that /tmp has sticky bit.;T@o:RDoc::Markup::Verbatim; [I"# Sequential echo server.
;TI".# It services only one client at a time.
;TI"CSocket.unix_server_loop("/tmp/sock") {|sock, client_addrinfo|
;TI"
begin
;TI"$ IO.copy_stream(sock, sock)
;TI" ensure
;TI" sock.close
;TI" end
;TI"};T:@format0:
@fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below00I"socket, client_addrinfo;T[ I"(path);T@)FI"Socket;TcRDoc::NormalClass00