English 中文(简体)
如果服务器不能有效,如何阻止偷窃连接
原标题:How to stop the ftp connection if the server is not avaliable

我为偷窃申请建立了一个投入渠道如下:

ftpStream = CFReadStreamCreateWithFTPURL(NULL, (CFURLRef) url);

networkStream = (NSInputStream *) ftpStream;        

[self.networkStream read:<#(uint8_t *)#> maxLength:<#(NSUInteger)#>]

当我读到数据时,如果服务器无法连接,方案将按上面第3行 st。 是否有办法在你能够界定的后一种方法可以阻止联系? 或是否有其他办法处理这一问题?

问题回答

Don t do a synchronous read. 相反,在下游物体上设一名代表,在跑道上排出,并打电话<代码>-开放<>。 如果你重新看一看一看一看,现在就把返回控制回到框架,并将为你们管理。 如果你重读背景线或撰写指挥线工具,则掌握read。 如果有数据可以读到,将叫你代表。

为了确定连接时间,你可以安排一个时间。 或者,如果你重新管理 run,你就只能限制你管理它的时间。 如果在建立联系之前时间已经届满,那么就在上游结束。





相关问题
What is the simplest way to create my own FTP server?

What is the simplest way to create my own FTP server in C#? Some of the folders will be virtual folders. The authentication should be from a SQL Server database, which includes tables of the ASP.NET ...

FTP In/Out Folder Name Best Practices

What best practices (if any) do you adhere to regarding setting up outgoing and incoming folders for your FTP clients? We typically use "outgoing" and "incoming", but no matter how you phrase the ...

Using TCPClient with RAW FTP to retrieve file

I get the following message back when trying to retrieve a file using TCPClient and RAW FTP: 425 Failed to establish connection. I connect using : using (TcpClient client = new TcpClient("...

Retrieving a List of Files from an FTP server in C#

I m trying to retrieve a list of files from an FTP server, but I m getting some weird non-ASCII responses. Here is the code that I am using: public string[] getFileList(string mask) { if(!...

FTP error on Quit command

I m using a ftp library that causes an error sending the quit command. It seems that the character before QUIT is not recognized. I took a look at the code but didn t find anything. 500 ?QUIT : ...

Passive FTP Timeout while using WinINet

I m trying to ftp a file using passive ftp but I get a timeout (12002) when the put command is called. I m able to use passive ftp with other ftp sites but not this new one. I ve tried this using ...

热门标签