Skip to content

Commit

Permalink
Add timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
ben221199 committed Dec 10, 2024
1 parent 332aa14 commit 9763a4e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Connections/EPPTCPConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function isClosed(): bool{
public function open(): bool{
$host = $this->registry->getHost();
$hostname = parse_url($host,PHP_URL_SCHEME).'://'.parse_url($host,PHP_URL_HOST);
$this->socket = fsockopen($hostname,$this->registry->getPort());
$this->socket = fsockopen($hostname,$this->registry->getPort(),$errCode,$errMsg,5);
return $this->socket!==false;
}

Expand Down
9 changes: 9 additions & 0 deletions test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
require_once 'vendor/autoload.php';

use YOCLIB\EPP\EPPElementHelper;

$document = \YOCLIB\EPP\EPPDocumentHelper::createEPPDocument();

EPPElementHelper::createEPPMessageElement($document,'Nederlands','ABC');
//EPPElementHelper::createEPPMessageElement($document,content:'ABC');

0 comments on commit 9763a4e

Please sign in to comment.