Hi Francisco, [fwd'ing to rpyc group]
Please use the mailing list to ask questions... Anyhow, if you need to pass parameters to the service instance, see https://groups.google.com/forum/?fromgroups=#!searchin/rpyc/aviv/rpyc/AMwdklcRzFA/S7-mf1oqiH4J If you want the on_connect method to gain access to the incoming connection, you can use self._conn. For referece, see https://github.com/tomerfiliba/rpyc/blob/master/rpyc/core/service.py#L145 The connection has a `channel` attribute, which has a `stream` attribute, which has a `sock` attribute... a bit long, I know, but bear in mind that not all connections operate on sockets (some work on pipes, etc.), so you don't always have a hostname. -tomer ----------------------------------------------------------------- *Tomer Filiba* tomerfiliba.com <http://www.facebook.com/tomerfiliba> <http://il.linkedin.com/in/tomerfiliba> On Sat, Feb 23, 2013 at 9:18 PM, Francisco <[email protected]> wrote: > Hello! > > (Rpyc question) How do I pass arguments to on_connect(). I want the > on_connect() function to know the hostname of the new connecting client. > Is there an easy way to do that? > > Cheers, > Franc > -- --- You received this message because you are subscribed to the Google Groups "rpyc" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
