ba0f3 / ssh2.nim

Async SSH, SCP and SFTP client for Nim, using libssh2 wrapper [WIP]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

expression: session_handshake(session, fd)

JingYu-Kylin opened this issue · comments

pkgs\ssh2-0.1.4\ssh2\private\session.nim(12, 17) Error: type mismatch: got <libssh2.Session, posix.SocketHandle>
but expected one of:
proc session_handshake(s: Session; fd: winlean.SocketHandle): cint
  first type mismatch at position: 2
  required type for fd: SocketHandle
  but expression 'fd' is of type: SocketHandle

expression: session_handshake(session, fd)

I know the reason because I am a Windows platform, but I don't know how to solve it

when defined(linux):

  proc session_handshake*(s: Session, fd: posix.SocketHandle): cint {.ssh2.}

when defined(windows):

  proc session_handshake*(s: Session, fd: winlean.SocketHandle): cint {.ssh2.}

I will check it soon, thank you!

I'm not planning to support Windows yet, I will add it soon when I have spare time. I'm sorry!