[Network] add stream socket API with StreamSocketClient class

Review Request #36 — Created Jan. 7, 2013 and submitted

olivier
Lunr
https://github.com/owizen/lunr/tree/streamclient
12249
lunr
This is the last version of streamSocket and StreamSocketClient classes:

select method renamed as discussed in https://groups.google.com/forum/?hl=en&fromgroups=#!topic/lunr-developers/K0EK9w3l6Pc

the read_all and read_chunk methods have been removed and the read method make use of stream-get-contents with a default parameter of -1.
http://php.net/manual/en/function.stream-get-contents.php

That review replaces http://reviews.lunr.nl/r/7/ and http://reviews.lunr.nl/r/10/

Note: the remve_flag method was removed after discussion but not restored, the need of such method doesn't seem to be so important.
Unit tests, live push to APNS
  • 0
  • 0
  • 17
  • 0
  • 17
Description From Last Updated
pprkut
  1. 
      
  2. src/Lunr/Network/StreamSocket.php (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
    That's our first candidate for a trait
  3. src/Lunr/Network/StreamSocket.php (Diff revision 1)
     
     
     
     
     
    move to top
  4. src/Lunr/Network/StreamSocket.php (Diff revision 1)
     
     
    weird sentence. Superfluous dot?
  5. src/Lunr/Network/StreamSocket.php (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    unify to set_timeout like detailed on the mailing list
  6. src/Lunr/Network/StreamSocket.php (Diff revision 1)
     
     
     
     
    Coding style
  7. src/Lunr/Network/StreamSocket.php (Diff revision 1)
     
     
  8. src/Lunr/Network/StreamSocket.php (Diff revision 1)
     
     
     
    one line only
  9. src/Lunr/Network/StreamSocket.php (Diff revision 1)
     
     
     
    one line only
  10. src/Lunr/Network/StreamSocket.php (Diff revision 1)
     
     
    Coding style
  11. src/Lunr/Network/StreamSocket.php (Diff revision 1)
     
     
     
    Coding style
  12. src/Lunr/Network/StreamSocketClient.php (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    make them protected. I expect the buffered client might want to use them
  13. src/Lunr/Network/StreamSocketClient.php (Diff revision 1)
     
     
    misleading. You want a URI here, not an actual established socket
  14. src/Lunr/Network/StreamSocketClient.php (Diff revision 1)
     
     
     
     
     
     
     
     
     
    Coding style
  15. src/Lunr/Network/StreamSocketClient.php (Diff revision 1)
     
     
     
     
     
     
     
    Coding style
  16. src/Lunr/Network/StreamSocketClient.php (Diff revision 1)
     
     
     
     
     
     
    Coding style
  17. src/Lunr/Network/StreamSocketClient.php (Diff revision 1)
     
     
    really.....
  18. tests/system/libraries/spwn/ResqueJobDispatcherTest.php (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
    This does not belong in this review
  19. 
      
olivier
olivier
pprkut
  1. This has seen enough reviews and plenty of eyes. I'd say it's in a very much reasonable state now (except for the occasional coding style issue ¬_¬).
    If we encounter any difficulties with this we can improve as we go.
    
    Nice Job! :)
  2. 
      
olivier
Review request changed

Status: Closed (submitted)

Change Summary:

Merged into master
Loading...