[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [coldsync-hackers] Re: Redux: Netsync + [X]inetd



> On Tue, 26 Feb 2002, Brian Johnson wrote:
> > Since we're talking about network hotsyncing, it would be great if the
> > system could handle multiple netsyncs simultaneously - I don't think it
> > currently does this
>
> 	I don't remember whether Netsync uses the ports in /etc/services
> just to initiate the sync, or for the data transfer as well. If it's the
> latter, then obviously you can't have multiple simultaneous netsyncs,
> because, well, the line is busy.
> 	OTOH, most such services just use the well known port to get the
> server's attention, then switch to a different port for the actual
> session. If this is the case, then you can trivially support multiple
> connections.
> 	Try using "nowait" instead of "wait" in your /etc/inetd.conf. If
> it works, that's a dancer.

Hmm... now let's handle this logically, shall we?
coldsync -md -t net

binds to udp/netsync-wakeup
and waits for (some packet)
and when it gets it, it hands back & forth (a couple more packets)
at which time it drops the bound udp/netsync-wakeup socket
and binds to tcp/netsync

whereupon sync ensues via TCP.

to daemonize this, we can either:
[1] modify it to work with x?inetd
or
[2] make it a proper daemon

Now, in order for us to do [1], we would have to figure some things out,
like
does x?inetd eat the original packet?  if so, can it be worked around? or
would a coldsync-udp server be more appropriate?.  Or, if we have pi-csd
answer the phone, how do we notify coldsync to pick up the TCP conversation?

or, for [2], what if we fork()ed after the udp session, then went back to
listen, and the child bound to tcp/netsync and had that conversation.
Ostensibly, it would have to un-bind() (or un-listen()) as soon as the
conversation started, so as not to hose the master process.

Patches to 2.1.3 by Francisco Castro
(http://www.thedotin.net/maillists/coldsync-hackers/msg00656.html)
gutted the UDP code, and he stated he had it running w/ pi-csd and inetd.

I haven't been able to reproduce this, or get a response from him on how he
did it.

but if he had the right idea...
then if I understood the init process a little better, I might be able to
get further.

Is there a document (or section of code or scribbled notes) that lists this
interaction?

L8r,
Rob

#!/usr/bin/perl -w
use Disclaimer qw/:standard/;



-- 
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.