On Tue, 2009-04-14 at 15:05 +0200, Giuseppe Scrivano wrote: > Alexandru Iancu <[email protected]> writes: > > > I hope it may use this because it's really nice feature, unfortunately > > I tried it yesterday > > evening with default parameters and it didn't worked. There are about > > 20 SCTP options > > so maybe it'll work with little bit of tuning ... neither did I looked > > into kernel sources > > to have a hint about what option to use to make it work. Actually I never > > did this ... > > The problem is that sendfile needs a file descriptor to use a the > destination socket. I don't know if it is possible to use a different > descriptor for a specific stream in the SCTP connection.
Of course, anyway I review the code I wrote and there were many other bugs(starting with wrong lksctp version for my kernel). > > > > Unlike HTTP, FTP transfers also big files so the spec. requires the server > > to cancel ongoing > > download/upload. I don't know how to stop a sendfile API? May I > > register a callback that OS > > checks from time to time to stop a sending file? > > The only solution is to `close ()' the socket of the transfer > connection. It will not be a valid descriptor and sendfile will return > an error. yes, this seems a good solution. > > > > I agree, I also would like to have them both. Again, maybe it's an > > socket option problem or a stupid bug in my code :) > > I tryed to focus on SCTP with 2 applications: a "server" listening on > > a one-to-many socket and a multiple threads client connecting on a > > one-to-one socket. Before you need to install a kernel loadable > > module(lksctp). I'll send you the sources later today. > > Ok, thanks. > > Giuseppe Andu.
