发布网友 发布时间:2022-05-24 18:30
共1个回答
热心网友 时间:2023-04-24 04:49
php函数boolsocket_set_option(resource$socket,int$level,int$optname,mixed$optval)用法说明:Thesocket_set_option()functionsetstheoptionspecifiedbytheoptnameparameter,atthespecifiedprotocollevel,tothevaluepointedtobytheoptvalparameterforthesocket。参数说明:socketAvalidsocketresourcecreatedwithsocket_create()orsocket_accept().levelThelevelparameterspecifiestheprotocollevelatwhichtheoptionresides.Forexample,toretrieveoptionsatthesocketlevel,alevelparameterofSOL_SOCKETwouldbeused.Otherlevels,suchasTCP,canbeusedbyspecifyingtheprotocolnumberofthatlevel.Protocolnumberscanbefoundbyusingthegetprotobyname()function.optnameTheavailablesocketoptionsarethesameasthoseforthesocket_get_option()function.optvalTheoptionvalue.返回值:成功时返回TRUE,或者在失败时返回FALSE。例子: