Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TOSMBSession Timeout variable #47

Open
yamakhalah opened this issue Apr 19, 2017 · 2 comments
Open

Add TOSMBSession Timeout variable #47

yamakhalah opened this issue Apr 19, 2017 · 2 comments

Comments

@yamakhalah
Copy link

Hardware / Software

Which version of the library were you using?
Custom Library with recompiled .a for TVOS

Which version of iOS are you running?
TVOS 10.2

What model of iOS device were you testing on?
AppleTV 2

If using CocoaPods, which version of CocoaPods are you on?
1.2.0

Goals

What is the outcome result you want to achieve with this library?

The default timeout is too long and it would be nice if we could modify it. For exemple my app use a completion block when the error block is called on function requestContentsOfDirectory(atFilePath path: String!, success successHandler: (([Any]?) -> Swift.Void)!, error errorHandler: ((Error?) -> Swift.Void)!)

The problem is the error block is called so far after the function call and i can't use the synchronous version because the app can't be stuck such long time.

Might be amazing if you could implement this feature.

@TimOliver
Copy link
Owner

TimOliver commented Apr 19, 2017

Hi @yamakhalah! Thanks for the issue!

Yeah. I agree. When I was testing this library, I mistyped the URL to my NAS several times and the timeout delay was really annoying.

Unfortunately, this is a libdsm level issue. I tried playing with the libdsm source code last year to try and introduce a connection timeout limit, but for the life of me, I couldn't get it working. I'm sadly still very new to the general concept of sockets, so I'm not sure how to properly configure them.

If anyone else wants to give it a try and submit a PR, this feature would be very much appreciated. :)

@yamakhalah
Copy link
Author

yamakhalah commented Apr 20, 2017

Hi,

Thanks for the quick reply.

As i can see, libdsm send some informations when you try to connect or receive files, and you print it.

Exemple:

netbios_ns_inverse: : No such file or directory
netbios_session_new, open_socket: : Operation timed out

Could be possible for you to add a delegate which send every status change with an Enumerate in order to receive clear informations of whats going on.

TOSMBClient connexion could be stopped quickly with this kind of implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants