[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Nonblocking Behaviour for .NET
[Thread Prev] | [Thread Next]
- Subject: Nonblocking Behaviour for .NET
- From: Jason Curl <jason@xxxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Fri, 26 May 2017 12:31:43 +0200
- To: <libssh@xxxxxxxxxx>
Hello,I've been reading the APIs and I don't find a solution, nor an example on how to do nonblocking connect, read and write. I'm writing a wrapper for libssh in .NET using C#, so I can't use any API that talks about an fd_set (requires C macros), struct timeval (which changes per OS). It should work on Windows and Linux.
Till now, the only docs I can see is that connect needs to be called more than once. I don't find a way to know when connect is finished (must I really poll? and if so, is there an example somewhere?) I was originally going to write a C-wrapper DLL that handles select() and fd's, but then that won't work on Windows.
Or would it, if I use the WinSock2 functionality under windows, and standard Posix under Linux?
Thanks in advance, Jason.
Re: Nonblocking Behaviour for .NET | Jason Curl <jason@xxxxxxxxxxxxxxxxxxxxxxxx> |