PageRenderTime 55ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/classes/Pheanstalk/Socket.php

http://github.com/pda/pheanstalk
PHP | 34 lines | 7 code | 3 blank | 24 comment | 0 complexity | ed454a98c5671183ad7c5aeaf8d5382f MD5 | raw file
Possible License(s): MIT
  1. <?php
  2. /**
  3. * A mockable wrapper around PHP "socket" or "file pointer" access.
  4. * Only the subset of socket actions required by Pheanstalk are provided.
  5. *
  6. * @author Paul Annesley
  7. * @package Pheanstalk
  8. * @licence http://www.opensource.org/licenses/mit-license.php
  9. */
  10. interface Pheanstalk_Socket
  11. {
  12. /**
  13. * Writes data to the socket.
  14. * @param string $data
  15. * @return void
  16. */
  17. public function write($data);
  18. /**
  19. * Reads up to $length bytes from the socket.
  20. *
  21. * @return string
  22. */
  23. public function read($length);
  24. /**
  25. * Reads up to the next new-line, or $length - 1 bytes.
  26. * Trailing whitespace is trimmed.
  27. *
  28. * @param int
  29. */
  30. public function getLine($length = null);
  31. }