downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

socket_getpeername> <socket_create
[edit] Last updated: Fri, 17 May 2013

view this page in

socket_get_option

(PHP 4 >= 4.3.0, PHP 5)

socket_get_optionPega opções de socket para o socket

Descrição

mixed socket_get_option ( resource $socket , int $level , int $optname )
Aviso

Esta função é EXPERIMENTAL. O comportamento desta função, seu nome, incluindo toda documentação pode ser modificado sem aviso em futuras versões do PHP. Esta função deve ser usada por sua própria conta e risco.

Aviso

Esta função não está documentada; somente a lista de argumentos está disponível.

Nota:

Essa função é para ser usada chamando socket_getopt() primeiramente para PHP 4.3.0



add a note add a note User Contributed Notes socket_get_option - [2 notes]
up
0
Chad Lavoie
2 years ago
If using Unix Sockets, and you want to use SO_PEERCRED, you can use the number 17 for the optname (and SOL_SOCKET for the level).  The PID of the connecting process will be returned.
up
0
recycling dot sp dot am at gmail dot com
2 years ago
Just 2 notes here:
- On UNIX, If SO_DEBUG is set, the php program needs an effective user id of 0.
-  activating SO_OOBINLINE on a socket is equivalent to passing MSG_OOB flag to each recieving functions used with that socket (eg: socket_recv, socket_recvfrom).

 
show source | credits | stats | sitemap | contact | advertising | mirror sites