@@ -265,7 +265,7 @@ function core_channel_write($req, &$pkt) {
265265}
266266
267267#
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
269269#
270270function core_channel_close ($ req , &$ pkt ) {
271271 global $ channel_process_map ;
@@ -297,7 +297,7 @@ function core_channel_close($req, &$pkt) {
297297 return ERROR_FAILURE ;
298298}
299299
300- #
300+ #
301301# Destroy a channel and all associated handles.
302302#
303303function channel_close_handles ($ cid ) {
@@ -578,7 +578,7 @@ function handle_dead_resource_channel($resource) {
578578
579579 # Make sure the provided resource gets closed regardless of it's status
580580 # as a channel
581- remove_reader ($ resource );
581+ remove_reader ($ resource );
582582 close ($ resource );
583583 } else {
584584 my_print ("Handling dead resource: {$ resource }, for channel: {$ cid }" );
@@ -822,7 +822,7 @@ function eof($resource) {
822822 #
823823 # See http://us2.php.net/manual/en/function.feof.php , specifically this:
824824 # 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:
826826 # <?php
827827 # function safe_feof($fp, &$start = NULL) {
828828 # ...
@@ -862,7 +862,7 @@ function read($resource, $len=null) {
862862 #my_print(sprintf("Reading from $resource which is a %s", get_rtype($resource)));
863863 $ buff = '' ;
864864 switch (get_rtype ($ resource )) {
865- case 'socket ' :
865+ case 'socket ' :
866866 if (array_key_exists ((int )$ resource , $ udp_host_map )) {
867867 my_print ("Reading UDP socket " );
868868 list ($ host ,$ port ) = $ udp_host_map [(int )$ resource ];
@@ -915,13 +915,13 @@ function read($resource, $len=null) {
915915 break ;
916916 }
917917 }
918-
918+
919919 if ($ resource != $ msgsock ) { my_print ("buff: ' $ buff' " ); }
920920 $ r = Array ($ resource );
921921 }
922922 my_print (sprintf ("Done with the big read loop on $ resource, got %d bytes " , strlen ($ buff )));
923923 break ;
924- default :
924+ default :
925925 # then this is possibly a closed channel resource, see if we have any
926926 # data from previous reads
927927 $ cid = get_channel_id_from_resource ($ resource );
@@ -948,7 +948,7 @@ function write($resource, $buff, $len=0) {
948948 #my_print(sprintf("Writing $len bytes to $resource which is a %s", get_rtype($resource)));
949949 $ count = false ;
950950 switch (get_rtype ($ resource )) {
951- case 'socket ' :
951+ case 'socket ' :
952952 if (array_key_exists ((int )$ resource , $ udp_host_map )) {
953953 my_print ("Writing UDP socket " );
954954 list ($ host ,$ port ) = $ udp_host_map [(int )$ resource ];
@@ -957,7 +957,7 @@ function write($resource, $buff, $len=0) {
957957 $ count = socket_write ($ resource , $ buff , $ len );
958958 }
959959 break ;
960- case 'stream ' :
960+ case 'stream ' :
961961 $ count = fwrite ($ resource , $ buff , $ len );
962962 fflush ($ resource );
963963 break ;
@@ -1107,7 +1107,7 @@ function remove_reader($resource) {
11071107 case 'socket ' :
11081108 register_socket ($ msgsock );
11091109 break ;
1110- case 'stream ' :
1110+ case 'stream ' :
11111111 # fall through
11121112 default :
11131113 register_stream ($ msgsock );
@@ -1156,7 +1156,7 @@ function remove_reader($resource) {
11561156 if ($ request ) {
11571157 write ($ msgsock , $ request );
11581158 }
1159- }
1159+ }
11601160 }
11611161 }
11621162 # $r is modified by select, so reset it
0 commit comments