[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Server API: How to communicate connection failures to client
[Thread Prev] | [Thread Next]
- Subject: Server API: How to communicate connection failures to client
- From: g4-lisz@xxxxxxxxxxxx
- Reply-to: libssh@xxxxxxxxxx
- Date: Wed, 6 Feb 2019 17:41:00 +0100
- To: libssh@xxxxxxxxxx
Hi there, My server implementation accepts direct-tcpip requests. In the message CB function, after receiving a message of type SSH_REQUEST_CHANNEL_OPEN, subtype SSH_CHANNEL_DIRECT_TCPIP, we try to open a local socket. If this is successful, a new channel with ssh_message_channel_request_open_reply_accept(message) is attached. But if opening of the local socket fails, how should the message be treated? Is there a way to signalize to the client that the connection failed, without opening a new channel? Or do I have to accept the request and open a channel in any case? And then close the channel again when the local socket operation failed? Right now I'm reading the OpenSSH server code to find out. But maybe someone could give me the answer and tell me what libssh functions should be used? Thanks, Till
Re: Server API: How to communicate connection failures to client | g4-lisz@xxxxxxxxxxxx |