Re: FTP client
Pontus Östlund <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <CAAyMhKxQUWc70fvwvr6r8pbpVoxWcDEVVD1C967biO+d1a_ggQ@mail.gmail.com> |
Good point. Perhaps "passive_cmd" or "data_cmd" would work? 2015-01-19 16:29 GMT+01:00 Peter Bortas <[email protected]>: > After a quick look: > > I think "cmd2()" could do with a more descriptive name. > > fd and fd2 would be more understandable as ctrlfd and listenfd or > something similar. > > -- > Peter Bortas > > On Mon, Jan 19, 2015 at 2:25 PM, Pontus Östlund <[email protected]> > wrote: > > Okey, I've implemented most (common) commands - like file transferring, > > directory listing and so on - and it seems to be working fairly well. > > > > > https://github.com/poppa/Pike-Modules/blob/master/Protocols.pmod/FTP.pmod > > > > And any feedback would be appreciated :) > > > > # Pontus > > > > 2015-01-16 15:09 GMT+01:00 Pontus Östlund <[email protected]>: > >> > >> Sweet, that did it. Thank you! > >> > >> # Pontus > >> > >> 2015-01-16 14:57 GMT+01:00 Chris Angelico <[email protected]>: > >>> > >>> On Sat, Jan 17, 2015 at 12:31 AM, Pontus Östlund <[email protected] > > > >>> wrote: > >>> > Okey, I now have a simple FTP client that at least seems to be > working > >>> > somewhat. The only problem right now is that binary data seems to be > >>> > scrambled in some way since binary files are broken when retrieved > and > >>> > written to local disk. Any ideas why? > >>> > > >>> > > >>> > > https://github.com/poppa/Pike-Modules/blob/master/Protocols.pmod/FTP.pmod > >>> > > >>> > >>> You're using gets(), which expects line-based results. Then you > >>> concatenate them all, and in the process, lose the newlines. > >>> > >>> I've sent you through a GitHub PR with a fix that appears to work on my > >>> system. > >>> > >>> ChrisA > >>> > >> > > >