Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move #define WAITFD_* to .h #80

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Move #define WAITFD_* to .h #80

wants to merge 3 commits into from

Conversation

brunoos
Copy link
Member

@brunoos brunoos commented Sep 12, 2013

No description provided.

@diegonehab
Copy link
Contributor

Hey Bruno. I am about to merge this pull request. There is another pull request by @horazont, #72 that is very related. His idea is to publish some additional symbols from LuaSocket so LuaSec can use them when loaded in the same process, rather than replicating the functionality. What do you think about that idea?

@brunoos
Copy link
Member Author

brunoos commented Sep 12, 2013

Hi Diego,

luasec imported some files from luasocket to deal with sockets and offer the same API for buffer. If some symbols from luasocket could be exported, it is possible to reuse luasocket as a library for luasec.

See: http://www.inf.ufg.br/~brunoos/luasec/light/

This was an experiment for 0.4, but the "dev" version of luasec has a build flag, you can choose to use the imported files from luasocket or link against "luasocket-lib".

@diegonehab
Copy link
Contributor

Do you know the minimal set of functions to be exported?

@brunoos
Copy link
Member Author

brunoos commented Sep 16, 2013

I think these are the functions:

ssl.c:266: buffer_init
ssl.c:278: buffer_meth_send
ssl.c:286: buffer_meth_receive
ssl.c:294: buffer_meth_getstats
ssl.c:302: buffer_meth_setstats
ssl.c:372: buffer_isempty

ssl.c:263: io_init

ssl.c:62: socket_strerror
ssl.c:72: socket_setblocking
ssl.c:76: socket_destroy
ssl.c:110: socket_waitfd
ssl.c:325: socket_setnonblocking
ssl.c:753: socket_open

ssl.c:98: timeout_markstart
ssl.c:265: timeout_init
ssl.c:361: timeout_meth_settimeout

@diegonehab
Copy link
Contributor

Should I prefix all symbols with ls_ or something, and mark these with LUASOCKET_API?

@brunoos
Copy link
Member Author

brunoos commented Sep 17, 2013

It could be good to avoid name clash. For now, it does not cause any trouble for luasec.

@darklajid
Copy link

Regarding the name clashes / prefix discussion:

I just looked at the FreeBSD luasocket port - that one patches all of these methods with a prefix.
The explanation in the commit over there:

-  namespace clash with www/lighttpd mod_magnet
   upstream is gone, but the port is still quite useful

That's from August 2010 and the latest bump (FreeBSD is updating to 3.0rc1 now) will keep that patch. If you'd agree to take that upstream that'd be amazing. I could prepare a patch for that (based on the FreeBSD one..) if you're okay with that.

@diegonehab
Copy link
Contributor

I don't have a problem prefixing all exported symbols with "ls" and making sure the symbols needed by LuaSec are exported. Can you prepare a patch addressing both issues?

@winterheart
Copy link

Hello.
Any news about this feature?

@ConiKost
Copy link

ConiKost commented Feb 6, 2021

Any news here?

@alerque
Copy link
Member

alerque commented Nov 8, 2023

Does anybody understand what happened here or better yet what needs to happen?

@ConiKost
Copy link

@winterheart ^^

@winterheart
Copy link

Well since then I've opened PR #346 with some fixes for original idea. That implementation already ported into Gentoo Linux luasocket package and used by luasec package. So I'd recommend move conversations there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants