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

yet more FTPAPI questions



Sender: Christian <chrisv5@xxxxxx>

those ones are mostly to Scott himself:

currently the error message texts are scattered all around the source code; I want to put them into on space (just like the error constants themselves); actually, would not even store the texts but create them when they are requested by FTP_errormsg (unless they are the result of errorstr()). I was even thinking about putting them into a message file, for ease of localization without recompiling. Opinions?

currently the default CCSIDs are constants. how about changing them to "typed constants" (initialized variables)? Again, that would allow changing them without a recompile. as it is, one can change the defaults for the data channel via ftp_codepage, but is stuck on the control channel.

A follow-up question to the former one, to Scott. Why did you set the server CCSID for the control channel to 437 and not 367? Is there really any server out there which uses the PC code set on the control channel? (I am aware that the IBM FTP server uses 819, ISO Latin-1, on the data channel per default).

my last question for the time being, about TCP_Conn. Actually, a few questions on that topic. First, let's see if I understood it right:

- obtain a numerical IP address from the host string
- create a socket
- change the socket to non-blocking, if a timeout is requested
- attempt connect
- when connect suceeds, return happily (I assume, that only happens
in the blocking mode; can't be *that* quick in non-blocking)
- if it failed, wait for success via select(); I am assuming that is for timeout/non-blocking mode *only*; but it kind of works as in the other case the timeout is set to zero; mind if I make that "cleaner"?
- if select returns with failure, we give up


Now comes the odd part for me; if select() returns with success, you seem not to trust the sockets API. Instead, you try to connect once more on the same socket and check if it fails with EISCONN (as expected). Um... is the sockets API (specifically select()) really that unreliable?

Regards,
Christian
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------