@@ -265,7 +265,7 @@ function core_channel_write($req, &$pkt) {
265
265
}
266
266
267
267
#
268
- # This is called when the client wants to close a channel explicitly. Not to be confused with
268
+ # This is called when the client wants to close a channel explicitly. Not to be confused with
269
269
#
270
270
function core_channel_close ($ req , &$ pkt ) {
271
271
global $ channel_process_map ;
@@ -297,7 +297,7 @@ function core_channel_close($req, &$pkt) {
297
297
return ERROR_FAILURE ;
298
298
}
299
299
300
- #
300
+ #
301
301
# Destroy a channel and all associated handles.
302
302
#
303
303
function channel_close_handles ($ cid ) {
@@ -578,7 +578,7 @@ function handle_dead_resource_channel($resource) {
578
578
579
579
# Make sure the provided resource gets closed regardless of it's status
580
580
# as a channel
581
- remove_reader ($ resource );
581
+ remove_reader ($ resource );
582
582
close ($ resource );
583
583
} else {
584
584
my_print ("Handling dead resource: {$ resource }, for channel: {$ cid }" );
@@ -822,7 +822,7 @@ function eof($resource) {
822
822
#
823
823
# See http://us2.php.net/manual/en/function.feof.php , specifically this:
824
824
# If a connection opened by fsockopen() wasn't closed by the server,
825
- # feof() will hang. To workaround this, see below example:
825
+ # feof() will hang. To workaround this, see below example:
826
826
# <?php
827
827
# function safe_feof($fp, &$start = NULL) {
828
828
# ...
@@ -862,7 +862,7 @@ function read($resource, $len=null) {
862
862
#my_print(sprintf("Reading from $resource which is a %s", get_rtype($resource)));
863
863
$ buff = '' ;
864
864
switch (get_rtype ($ resource )) {
865
- case 'socket ' :
865
+ case 'socket ' :
866
866
if (array_key_exists ((int )$ resource , $ udp_host_map )) {
867
867
my_print ("Reading UDP socket " );
868
868
list ($ host ,$ port ) = $ udp_host_map [(int )$ resource ];
@@ -915,13 +915,13 @@ function read($resource, $len=null) {
915
915
break ;
916
916
}
917
917
}
918
-
918
+
919
919
if ($ resource != $ msgsock ) { my_print ("buff: ' $ buff' " ); }
920
920
$ r = Array ($ resource );
921
921
}
922
922
my_print (sprintf ("Done with the big read loop on $ resource, got %d bytes " , strlen ($ buff )));
923
923
break ;
924
- default :
924
+ default :
925
925
# then this is possibly a closed channel resource, see if we have any
926
926
# data from previous reads
927
927
$ cid = get_channel_id_from_resource ($ resource );
@@ -948,7 +948,7 @@ function write($resource, $buff, $len=0) {
948
948
#my_print(sprintf("Writing $len bytes to $resource which is a %s", get_rtype($resource)));
949
949
$ count = false ;
950
950
switch (get_rtype ($ resource )) {
951
- case 'socket ' :
951
+ case 'socket ' :
952
952
if (array_key_exists ((int )$ resource , $ udp_host_map )) {
953
953
my_print ("Writing UDP socket " );
954
954
list ($ host ,$ port ) = $ udp_host_map [(int )$ resource ];
@@ -957,7 +957,7 @@ function write($resource, $buff, $len=0) {
957
957
$ count = socket_write ($ resource , $ buff , $ len );
958
958
}
959
959
break ;
960
- case 'stream ' :
960
+ case 'stream ' :
961
961
$ count = fwrite ($ resource , $ buff , $ len );
962
962
fflush ($ resource );
963
963
break ;
@@ -1107,7 +1107,7 @@ function remove_reader($resource) {
1107
1107
case 'socket ' :
1108
1108
register_socket ($ msgsock );
1109
1109
break ;
1110
- case 'stream ' :
1110
+ case 'stream ' :
1111
1111
# fall through
1112
1112
default :
1113
1113
register_stream ($ msgsock );
@@ -1156,7 +1156,7 @@ function remove_reader($resource) {
1156
1156
if ($ request ) {
1157
1157
write ($ msgsock , $ request );
1158
1158
}
1159
- }
1159
+ }
1160
1160
}
1161
1161
}
1162
1162
# $r is modified by select, so reset it
0 commit comments