j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Hi All,
Is there a good way to handle Socket timeouts when transferring files to a server?
ftp _ FTPClient openOnHostNamed: remoteHost. ....some code ftp putFileNamed: 'something; as: 'something'. <---error when connecting to remoteHost
Socket>>connectTo: hostAddress port: port waitForConnectionFor: timeout "Initiate a connection to the given port at the given host address. Waits until the connection is established or time outs." self connectNonBlockingTo: hostAddress port: port. self waitForConnectionFor: timeout ifTimedOut: [ConnectionTimedOut signal: 'Cannot connect to ' , (NetNameResolver stringFromAddress: hostAddress) , ':' , port asString]
Thanks in advance,
Ching
Attachments:
squeak-dev@lists.squeakfoundation.org