summaryrefslogtreecommitdiff
path: root/ext/sockets/php_sockets.h
Commit message (Collapse)AuthorAgeFilesLines
* Sync leading and final newlines in source code filesPeter Kokot2018-10-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* year++Xinchen Hui2018-01-021-1/+1
|
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* Fix #72733: Expose getaddrinfo C function, and supporting connect/bindDavid Walker2016-08-121-0/+2
| | | | | | | Feature request was to expose getaddrinfo(). I accomplish this by having an array of resources that are the addrinfo structures. The resources can be used in new functions to connect/bind, and one function to examine the contents of the resource.
* Fix bug #71575 removing extra semicolons outside macrosJames Titcumb2016-03-031-1/+1
|
* Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
|\ | | | | | | | | * PHP-5.6: Happy new year (Update copyright to 2016)
| * Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| |
| * bump yearXinchen Hui2015-01-151-1/+1
| |
* | switch to the unified globals accessor where appropriateAnatol Belski2015-07-291-6/+1
| |
* | cleanup mod version macros and mod defs, round xAnatol Belski2015-03-231-0/+2
| |
* | bump yearXinchen Hui2015-01-151-1/+1
| |
* | first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-4/+4
| |
* | Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-11-261-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: (102 commits) fix dir separator in test fix TS build fix TS build Better fix for bug #68446 Revert "Merge remote-tracking branch 'origin/PHP-5.6'" Revert NEWS and set test to XFAIL Revert "Fix bug #68446 (bug with constant defaults and type hints)" Improved zend_hash_clean() and added new optimized zend_symtable_clean() Use inline version of zval_ptr_dtor() Added new optimized zend_array_destroy() function Moved i_zval_ptr_dtor() from zend_execute.h to zend_variables.h fix REGISTER_NS_*_CONSTANT macros Removed useless assert. EG(uninitialized_zval) can't be refcounted. Use specialized destructors when types of zvals are known. move tests into proper place Improved assignment to object property Reuse zend_assign_to_variable() in zend_std_write_property() cleanup comments from svn/cvs era fix dir separator in test fork test for windows ...
| * | add php_create_socket/php_destroy_socket PHP_SOCKETS_API to abel to create ↵Mathieu CARBONNEAUX2014-11-101-0/+2
| | | | | | | | | | | | socket ressource in other ext
* | | convert ext/sockets to work with the static tsrm cache pointerAnatol Belski2014-10-051-1/+1
|/ /
* | s/PHP 5/PHP 7/Johannes Schlüter2014-09-191-1/+1
| |
* | Refactoring socket (only compilable now)Xinchen Hui2014-05-171-1/+1
|/
* Bump yearXinchen Hui2014-01-031-1/+1
|
* - Fixed bug #66381 (__ss_family was changed on AIX 5.3)Felipe Pena2014-01-011-0/+4
|
* Revert "Fixed Bug #64340 (sockets tests failed) Patch by Reeze"Xinchen Hui2013-03-051-4/+0
| | | | | | build break, will only leave the test script fix first This reverts commit f2246f352fc01295c370728d68a9bcd2bb546652.
* Fixed Bug #64340 (sockets tests failed) Patch by ReezeXinchen Hui2013-03-031-0/+4
| | | | Add __APPLE_USE_RFC_3542 for OS X 10.7 because IPv6 options are incompatible with RFC 2292.
* Fix ext/sockets build with phpizeGustavo Lopes2013-02-241-0/+4
| | | | Fixes bug #64285
* Fix bug and hopefully build on WinSDK 6.1Gustavo Lopes2013-02-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | There build was failing on rmtools on the sockets extension for two reasons: 1. IPV6_TCLASS and IPV6_RECVTCLASS not being defined. These are probably recent additions to SDK. Windows 7 doesn't event seem to have complete support for IPV6_TCLASS, not accepting in WSASendMsg(). The parts that needed this constant were not guarded by #ifdefs. They are now. 2. The constants EWOULDBLOCK and EINPROGRESS not being defined. These were only defined in php_network.h, outside of the extension, and not all source files included this header. Nevertheless, a macro defined in php_sockets.h needed these constants. When this macro was used in files that did not include php_network.h, the compilation would fail. Surprisingly, the build did not fail when using the 7.1 Windows SDK (more likely, the CRT headers used in VC10), as somehow errno.h was being included through some other standard header. This would make the constant EWOULDBLOCK defined; however, it would be defined to the wrong value. In the winsock context, WSAEWOULDBLOCK should be used instead. Because we have difficulty using Windows-only constants in the code, we (re)define EWOULDBLOCK to WSAEWOULDBLOCK. This has the obvious disavantage we may miss problems like this again in the future.
* php_strerror in ext/sockets renamed in 5.5Gustavo Lopes2013-02-021-1/+1
|
* Merge branch 'sendrecvmsg_rebase_55' into PHP-5.5Gustavo Lopes2013-02-021-1/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sendrecvmsg_rebase_55: (31 commits) Fix multicast.c not defining errno on Windows Fix non-Windows build send/recvmsg() support for Windows Remove some pre-vista code Revert "Payload of HOPLIMIT/TCLASS are 8-bit" Ensure memory is initialized Payload of HOPLIMIT/TCLASS are 8-bit Fix buf in string -> int conv. Build fixes; accept names for if_index Refactoring: move stuff to new conversions.c Support sticky IPV6_PKTINFO Rename some functions for consistency Destroy ancillary registry on shutdown Move some multicast stuff to multicast.c Fix mcast_ipv6_send test Check return of fstat() Fix build on Mac OS X Register extra MSG_* constants Add test for CMSG_RIGHTS Add test for CMSG_CREDENTIALS message ...
| * send/recvmsg() support for WindowsGustavo Lopes2013-02-021-1/+3
| |
| * Move some multicast stuff to multicast.cGustavo Lopes2013-02-021-0/+6
| |
| * Redactor to expose socket_import_file_descriptor()Gustavo Lopes2013-02-021-0/+1
| |
| * Wrap recvmsg() and sendmsg()Gustavo Lopes2013-02-021-0/+10
|/ | | | | | | | | | | | | | | | | | This introduces two new functions: int socket_recvmsg(resource $socket, array &$msghdr, int $flags) int socket_sendmsg(resource $socket, array $msghdr, int $flags) The arrays representing struct msghdr follow the native counterpart closely: structs are mapped to arrays, fields to array elements whose key is the name of the field without the prefix (e.g. "name" instead of "msg_name") and array are mapped to sequential numeric PHP arrays. Right now the only type of ancillary data supported is fot the level/type pair IPPROTO_IPV6/IPV6_PKTINFO. I also refactored out the name resolution functions and made sockets_strerror() a global function.
* Ignore warnings on EAGAIN/EWOULDBLOCK/EINPROGRESSGustavo Lopes2013-02-021-1/+3
| | | | See bug #63570
* Move & improve PHP_SOCKET_ERROR defGustavo Lopes2013-02-021-7/+7
|
* Move some declarations to sockets.cGustavo Lopes2013-02-021-35/+0
|
* Happy New YearXinchen Hui2013-01-011-1/+1
|
* - Year++Felipe Pena2012-01-011-1/+1
|
* - Added socket_import_stream().Gustavo André dos Santos Lopes2011-03-221-4/+6
| | | | | | | - Fixed socket_strerror.phpt - Made php_set_sock_blocking return FAILURE on fcntl error. - Made socket_set_block()/socket_set_nonblock() emit warning on error.
* - Year++Felipe Pena2011-01-011-1/+1
|
* sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.phpSebastian Bergmann2010-01-031-1/+1
|
* Share the php_sockets.h headerMikko Koppanen2009-12-271-0/+2
| | | | | Share php_sockets_le_socket_name
* - #49464, fix buildPierre Joye2009-09-041-1/+3
|
* export le_socket from ext/socketsAntony Dovgal2009-08-311-0/+2
|
* Fix buildHannes Magnusson2009-01-241-1/+1
|
* MFH: Windows support for stream_socket_pair(), by moving the socketpair() ↵Kalle Sommer Nielsen2009-01-231-1/+8
| | | | implementation from ext/sockets to win32/
* MFH:Kalle Sommer Nielsen2009-01-011-1/+1
| | | | | | | | [DOC] Renable socket_create_pair() on Windows # ext/sockets have its own implementation of socketpair(), perhaps we should move it # to the core. This will make stream_socket_pair() available on Windows aswell
* MFH: Bump copyright year, 3 of 3.Sebastian Bergmann2008-12-311-1/+1
|
* remove unused PHP_EXTNAME_API macros.Nuno Lopes2008-01-031-2/+0
| | | | | #in preparation for the gcc 4 visibility patch
* MFH: Bump copyright year, 2 of 2.Sebastian Bergmann2007-12-311-1/+1
|
* MFH:- Fixed bug #21197 (socket_read() outputs error with PHP_NORMAL_READ)Jani Taskinen2007-07-221-1/+4
|
* Remove pointless RINITIlia Alshanetsky2007-05-191-1/+0
|
* Add missing ifdefs for shutdown()Hannes Magnusson2007-01-101-0/+2
|
* MFH: Bump year.Sebastian Bergmann2007-01-011-1/+1
|