@@ -13,12 +13,12 @@ class CacheIOHandler
1313{
1414 const SOCKET_TYPE_IP = 'ip ' ;
1515 const SOCKET_TYPE_FILE = 'file ' ;
16-
16+
1717 private $ location ;
1818 private $ serverPort ;
1919 private $ bufferLength ;
2020 private $ socketType ;
21-
21+
2222 public function __construct ($ location , $ serverPort , $ bufferLength , $ socketType )
2323 {
2424 $ this ->location = $ location ;
@@ -37,7 +37,7 @@ public function writeToSocket($socket, $dataString)
3737 public function createServerSocket ()
3838 {
3939 $ socketType = AF_INET ;
40- if ($ this ->socketType == self ::SOCKET_TYPE_FILE ) {
40+ if ($ this ->socketType == self ::SOCKET_TYPE_FILE ) {
4141 $ socketType = AF_UNIX ;
4242 }
4343 $ socket = socket_create ($ socketType , SOCK_STREAM , 0 );
@@ -64,7 +64,7 @@ public function createServerSocket()
6464 public function createClientSocket ()
6565 {
6666 $ socketType = AF_INET ;
67- if ($ this ->socketType == self ::SOCKET_TYPE_FILE ) {
67+ if ($ this ->socketType == self ::SOCKET_TYPE_FILE ) {
6868 $ socketType = AF_UNIX ;
6969 }
7070 $ socket = socket_create ($ socketType , SOCK_STREAM , 0 );
@@ -105,14 +105,14 @@ public function closeSocket($socket)
105105 {
106106 socket_close ($ socket );
107107 }
108-
108+
109109 public function removeSocketFile ()
110110 {
111- if ($ this ->socketType == self ::SOCKET_TYPE_FILE ) {
111+ if ($ this ->socketType == self ::SOCKET_TYPE_FILE ) {
112112 unlink ($ this ->location );
113113 }
114114 }
115-
115+
116116 public function getServerIp ()
117117 {
118118 return $ this ->location ;
0 commit comments