Suggested approach for missing functions
2 posts
• Page 1 of 1
Suggested approach for missing functions
What kind of approach you would suggest to implement missing functions (like some of the functions from (stream?_)socket_* family)? I would like to keep part of the codebase compatible with php.
Variants I thought of:
Variants I thought of:
- Implementing missing functions as a library. Would compatibility with existing functions like stream_socket_server (in PhpNetClassLibrary) be a problem? It seems linking a library providing implementation of a function already defined in PhpNetClassLibrary (with FunctionImplOptions.NotSupported) is, well, not supported
- Implementing a 'facade' interface and providing two implementation for it - one would be used where all functions are available (in vanilla php), and the other one would call in to .net sockets (probably bypassing Phalanger-provided socket functions as those don't seem to be fully developed yet).
- Implementing another backend for existing socket library. Socket libraries do not seem to be particularly popular in PHP world. Searching for 'php socket library' on github yields repositories with less than 10 forks in the top.
- weirdan
- Posts: 17
- Joined: June 4th, 2013, 1:11 am
Re: Suggested approach for missing functions
Missing functions should be implemented in PhpNetClasslibrary (https://github.com/DEVSENSE/Phalanger/t ... assLibrary)
In this way compiler won't break and you will be notified during compile time, there is an unsupported function usage. Preferred is to implement the functions you need and share it with community
In this way compiler won't break and you will be notified during compile time, there is an unsupported function usage. Preferred is to implement the functions you need and share it with community
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 6 guests