Remove a deprecated function in BINKP and SocketClient
This commit is contained in:
parent
173446edbe
commit
00494cadfa
@ -1433,33 +1433,10 @@ final class Binkp extends BaseProtocol
|
|||||||
}
|
}
|
||||||
|
|
||||||
$wd = ($this->mqueue->count() || $this->tx_left || ($this->sessionGet(self::SE_SENDFILE) && $this->send->fd && ! $this->sessionGet(self::SE_WAITGET)));
|
$wd = ($this->mqueue->count() || $this->tx_left || ($this->sessionGet(self::SE_SENDFILE) && $this->send->fd && ! $this->sessionGet(self::SE_WAITGET)));
|
||||||
$rd = TRUE;
|
|
||||||
|
|
||||||
try {
|
|
||||||
Log::debug(sprintf('%s:- Checking if there more data (ttySelect), timeout [%d]',self::LOGKEY,self::TIMEOUT_TIME));
|
|
||||||
|
|
||||||
// @todo we need to catch a timeout if there are no reads/writes
|
|
||||||
$rc = $this->client->ttySelect($rd,$wd,self::TIMEOUT_TIME);
|
|
||||||
|
|
||||||
Log::debug(sprintf('%s:- ttySelect returned [%d]',self::LOGKEY,$rc));
|
|
||||||
|
|
||||||
} catch (\Exception) {
|
|
||||||
$this->error_close();
|
|
||||||
$this->error = -2;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->rc = ($this->originate ? (self::S_REDIAL|self::S_ADDTRY) : self::S_BUSY);
|
$this->rc = ($this->originate ? (self::S_REDIAL|self::S_ADDTRY) : self::S_BUSY);
|
||||||
|
|
||||||
if ($rc === 0) {
|
if (! $this->binkp_recv()) {
|
||||||
$this->error_close();
|
|
||||||
$this->error = -1;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($rd && ! $this->binkp_recv()) {
|
|
||||||
Log::info(sprintf('%s:- BINKP finished reading',self::LOGKEY));
|
Log::info(sprintf('%s:- BINKP finished reading',self::LOGKEY));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -556,29 +556,4 @@ final class SocketClient {
|
|||||||
{
|
{
|
||||||
return time()+$expire;
|
return time()+$expire;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* See if there is data waiting to collect, or if we can send
|
|
||||||
*
|
|
||||||
* @param bool $read
|
|
||||||
* @param bool $write
|
|
||||||
* @param int $timeout
|
|
||||||
* @return int
|
|
||||||
* @throws \Exception
|
|
||||||
* @deprecated use canSend or hasData
|
|
||||||
*/
|
|
||||||
public function ttySelect(bool $read,bool $write, int $timeout): int
|
|
||||||
{
|
|
||||||
if ($this->rx_left) {
|
|
||||||
if (self::DEBUG)
|
|
||||||
Log::debug(sprintf('%s:= We still have [%d] chars in the RX buffer.',self::LOGKEY,$this->rx_left));
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$read = $read ? [$this->connection] : NULL;
|
|
||||||
$write = $write ? [$this->connection] : NULL;
|
|
||||||
|
|
||||||
return $this->socketSelect($read,$write,NULL,$timeout);
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user