Browse Source

Refactor php7-mod-sockets code

DSR! 2 years ago
parent
commit
7492f11a54
2 changed files with 0 additions and 27 deletions
  1. 0 10
      src/pineapple/api/Module.php
  2. 0 17
      src/pineapple/api/pineapple.php

+ 0 - 10
src/pineapple/api/Module.php

@@ -106,16 +106,6 @@ abstract class Module
         return \helper\getMacFromInterface($interface);
     }
 
-    protected function udsSend($path, $message)
-    {
-        return \helper\udsSend($path, $message);
-    }
-
-    protected function dgramUdsSend($path, $message)
-    {
-        return \helper\dgramUdsSend($path, $message);
-    }
-
     protected function installDependency($dependencyName, $installToSD = false)
     {
         if ($installToSD && !$this->isSDAvailable()) {

+ 0 - 17
src/pineapple/api/pineapple.php

@@ -41,23 +41,6 @@ function checkRunningFull($processString) {
     return count($output) > 0;
 }
 
-function udsSend($path, $message)
-{
-    $sock = stream_socket_client("unix://{$path}", $errno, $errstr);
-    fwrite($sock, $message);
-    fclose($sock);
-    return true;
-}
-
-function dgramUdsSend($path, $message)
-{
-    if(!($sock = socket_create(AF_UNIX, SOCK_DGRAM, 0))) {
-        return false;
-    }
-    socket_sendto($sock, $message, strlen($message), 0, $path);
-    return true;
-}
-
 function uciGet($uciString, $autoBool = true)
 {
     $uciString = escapeshellarg($uciString);