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

SocketStream: add support for unix domain sockets #100

Merged
merged 1 commit into from
Nov 26, 2012

Conversation

alonho
Copy link
Contributor

@alonho alonho commented Nov 25, 2012

Added client, server and a test.

The server code isn't very pretty as it was highly oriented to networking. I didn't want to make a bigger refactoring as it won't be backward compatible (and I'd be happy to see it in 3.2).

It'd be perfectly fine if you decide not to merge.. I can offer a prettier solution to 3.3 (specifically add separate constructors to the Server class instead of tons of mutually exclusive arguments)

@tomerfiliba tomerfiliba merged commit ebc0bbd into tomerfiliba-org:LTS3.2 Nov 26, 2012
@tomerfiliba
Copy link
Collaborator

i'm going to release 3.2.3 next week so i incorporated it despite my reservations. on the other hand, i don't want to break backwards compatibility for the 3.2 branch, so i decided to live with it. for 3.3 i'll prolly rewrite it.

also, 👎 for testing if ipv6 != False :-)

thanks!

@alonho
Copy link
Contributor Author

alonho commented Nov 27, 2012

you're right about the ipv6. I was in the mood of comparing all values to their defaults for some reason.

I wonder what are your thoughts about function arguments default values. I usually set them to None always. that way I can always compare to None to see if a user has set a value, and even more important factory functions that just call the same function don't need to copy it's return values.

then again, if it was easy to extract defaults it could be a different ball game:
imagine the following for testing if a value is set: if ipv6 == current_func.defaults.ipv6. (basically a better interface for func.func_defaults)
and for passing along defaults: def factory_function(ipv6=orig_function.defaults.ipv6)

@tomerfiliba
Copy link
Collaborator

go ahead and send a patch to python :)

i'm all for factory methods. i wanted to add bind_tcp(host, port, ...)
and bind_unixdomain(path, ...), but that would break old code. i might
do that for 3.3.
on the other hand, we've only had one "kind" of server till now, so it was
silly to force everyone to use ThreadedServer.bind_tcp(...) instead of
just ThreadedServer(...)

-tomer


Tomer Filiba
tomerfiliba.com http://www.facebook.com/tomerfiliba
http://il.linkedin.com/in/tomerfiliba

On Tue, Nov 27, 2012 at 12:50 PM, Alon Horev [email protected]:

factory_function

coldfix pushed a commit that referenced this pull request Jul 27, 2017
Resolves #100, #208.

Cherry-pick: ebc0bbd

Thomas Gläßle: conflict resolution + removed whitespace
coldfix pushed a commit that referenced this pull request Jul 28, 2017
Resolves #100, #208.

Cherry-pick: ebc0bbd

Thomas Gläßle: conflict resolution + removed whitespace
coldfix added a commit that referenced this pull request Aug 7, 2017
- Fix refcount leakage when unboxing from cache (#196)
- Fix TypeError when dispatching exceptions on py2 (unicode)
- Respect ``rpyc_protocol_config`` for default Service getattr (#202)
- Support unix domain sockets (#100,#208)
- Use first accessible server in ``connect_by_service`` (#220)
- Fix deadlock problem with logging (#207,#212)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants