문제

I try to make an app that can make a connection into a FTP server. I've use Chilkat library to do this connection. The problem is, I want to test my app and make a wrong connection. So i make a connection into my FTP server, but using SSL connection (base on chilkat example in Chilkat sample code for implicit SSL connection)

FYI, I am not setting SSL in my FTP server. After I run my code on device, the app crashed, and the debugger showed SIGPIPE. I know SIGPIPE is because I made a wrong socket connection, but I dont know how to handle it. I have read an article about uncaught exception on this link, but I don't know how to implement these.

Can somebody tell me, how to handle these SIGPIPE exceptions?

도움이 되었습니까?

해결책

Have a look at this answer: Prevent Sigpipes

When you ignore sigpipes your app won't crash anymore when recieving a sigpipe.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top