.net - Create TCP socket from unmanaged file descriptor in C# -


i'm using unmanaged c library, libusbmuxd, create tunnel phone though usb cable. connects device , returns file descriptor socket of connection.

/**  * request proxy connect   *  * @param handle returned 'usbmuxd_scan()'  *  * @param tcp_port tcp port number on device, in range 0-65535.  *  common values 62078 lockdown, , 22 ssh.  *  * @return file descriptor socket of connection, or -1 on error  */ int usbmuxd_connect(const int handle, const unsigned short tcp_port); 

i want send ssh commands through using ssh.net, ssh.net supports communication through tcp port. how can make listening tcp socket file descriptor can use ssh.net (e.g. var connectioninfo = new connectioninfo("127.0.0.1", "22", "mobile", authenticationmethod))?

i know can make filestream object unmanaged file descriptor. can maybe use c# object create socket though ssh.net communicate?


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -