socket_set_blocking
(PHP4 >= 4.0b4)
socket_set_blocking --- 設定socket擱置/非擱置模式
語法 :
int socket_set_blocking(int socket descriptor, int mode)說明 :
如果mode是false,則給予的socket descriptor將會切換成非擱置模式,如果mode是true,它將會切換成擱置模式。這會影響到像是fgets( )從socket讀取的函式,在非擱置模式中,呼叫fgets( )將會永遠傳回擱置模式,它將會等待資料成為可用的資料。
此函式是事前呼叫socket_set_blocking( ),但是並不讚成這種用法。