Commit Graph

21 Commits

Author SHA1 Message Date
Jason Greene
165a97c90f Sockets Rework Patch 3 of 3
Nuked all fd code
Rewrote socket_select to use arrays instead of the fd code
(This has the side-effect of fixing quite a few bugs)
2002-03-06 20:19:09 +00:00
Jason Greene
e228b16885 Socket Rework Patch 2
Redesigned socket_recv() as outlined on php-dev
Modified socket_last_error() to no longer clear the error
Added socket_clear_error()
Fixed socket_set_nonblock()
Added socket_set_block()
Fixed a proto
Saved 1 byte of RAM : )
2002-03-06 05:21:56 +00:00
Stig Venaas
6e1878b0fc Added some consts for arguments in network.c declarations. Moved
php_sockaddr_storage to php_network.h and added check for struct
sockaddr_storage
2002-01-06 11:54:19 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Jon Parise
f8fb5e5d98 Include <sys/socket.h> for 'struct sockaddr'.
# This fixes my FreeBSD build.
2001-11-06 14:35:26 +00:00
Markus Fischer
dceb1e7814 Remove prototype warnings under linux. 2001-11-01 22:40:43 +00:00
Daniel Beulshausen
d0433b6d1c make this function static 2001-11-01 17:25:56 +00:00
Daniel Beulshausen
2fba036202 - convert to use new zend_parse_parameters API
- unify errormessages + add socket_last_error()
- fix linklibrary under windows
- some streamlining
2001-11-01 16:51:59 +00:00
Sascha Schumann
bfef93878c Force proper alignment of php_sockaddr_storage. Sparc will throw
a SIGBUS, when accessing the family part of a char-aligned structure.
2001-09-26 15:12:20 +00:00
Jason Greene
9fe46a52d4 Much better fix for non forte compilers on Solaris.
Removed pragma hack.
Renamed socket struct to bsd_socket.
2001-09-04 22:27:30 +00:00
Daniel Beulshausen
69a4760b48 fix recently discovered api flaws
- nuke first parameter to socket_select (detemine it ourself)
- swap parameters for socket_fd_set, socket_fd_clear & socket_fd_isset
- allow to pass an array of sockets to socket_fd_set + socket_fd_clear
2001-07-25 22:03:55 +00:00
Sterling Hughes
d3b4074ed7 Fix compile warning. 2001-05-21 19:36:22 +00:00
Daniel Beulshausen
9820c2a5af update sockets to work with winsock as well 2001-05-17 17:02:37 +00:00
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
Sterling Hughes
a75b19e0f6 - Fix the handling of resource entries
- Fix the fd_dealloc() function
2000-12-03 19:17:09 +00:00
Chris Vandomelen
b57f9eb541 Added ini entry for choosing whether to use the read() wrapper or directly
calling the read() system call.
# Some people were commenting about "oddities" in the wrapper that I hadn't
# noticed before, though I've used it in many places before now..
2000-10-22 23:43:48 +00:00
Thies C. Arntzen
e5d8f20f17 make ZTS mode compile 2000-09-07 12:32:47 +00:00
Sterling Hughes
f75db1e3cb A Whole buncha stuff, mostly bug fixing...
- Make constants case-sensitive, conforming with the rest of PHP &
	the C API.
	- Make module compatible with thread safety features.
	- open_listen_sok() -> open_listen_sock()
	- Remove ext_skel comments
	- Get rid of the ZVAL macro and replace with the correct Z_*_*
	macros
	- declare all functions local to the file as static.
	- Remove empty PHP_MSHUTDOWN() function.
	- Removed confirm_sockets_compiled()
	- Changed RETVAL_* macro's to RETURN_* macro's eliminating errors
	with incorrect return values and a potential leak/crash or two.
	- functions that return void, actually return void
	- Replaced 'long' in the prototypes with 'int'
	- Fixed fd_zero() function, it gave a WRONG_PARAM_COUNT when you
	gave it the proper parameter count.
	- Changed the way an arbitrary number of parameters were accessed
	from build_iovec() to use the Zend API.
	- Added socketpair() and shutdown() functions.
2000-08-20 10:31:27 +00:00
Chris Vandomelen
fd3d84ee52 * php4/ext/sockets.c, php4/ext/php_sockets.h:
Numerous changes. Many prototypes changed to be more like the
	appropriate *NIX counterparts. Many new prototypes defining many
	more advanced socket routines. Better AF_UNIX socket support.
	bind() now recognizes the socket type and acts appropriately,
	instead of needing the AF_* for the socket passed in.
# Something I'd like to write yet is proper signal() support. Unfortunately,
# the last time I tried, doing anything with the signal except ignoring it
# caused PHP to segfault. And to have decent socket support.. at least, from
# my experience, having signals is a good thing. Only problem.. to implement
# it, some changes would have to be made to the parser - since that is where
# the problems lie on handling asynchronous signals.
2000-07-08 01:50:34 +00:00
Sascha Schumann
e24f505bf9 Identifiers which begin with an underscore are reserved. Changed
_PHP_SOCKETS_H to PHP_SOCKETS_H.
2000-07-03 06:45:07 +00:00
Chris Vandomelen
21abde5ca1 * Makefile.in
config.m4
  php_sockets.h
  sockets.c
  sockets.php:
  - Added files needed for Unix-style sockets support in PHP.
2000-07-03 04:35:57 +00:00