Added a ssh_bind_set_fd() function.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@754 7dcaeef0-15fb-0310-b436-a5af3365683c
Этот коммит содержится в:
родитель
2934765c76
Коммит
d008e5aeb8
@ -21,6 +21,12 @@
|
|||||||
* vim: ts=2 sw=2 et cindent
|
* vim: ts=2 sw=2 et cindent
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup ssh_server SSH Server
|
||||||
|
* @addtogroup ssh_server
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef SERVER_H
|
#ifndef SERVER_H
|
||||||
#define SERVER_H
|
#define SERVER_H
|
||||||
|
|
||||||
@ -37,7 +43,8 @@ SSH_BIND *ssh_bind_new(void);
|
|||||||
void ssh_bind_set_options(SSH_BIND *ssh_bind, SSH_OPTIONS *options);
|
void ssh_bind_set_options(SSH_BIND *ssh_bind, SSH_OPTIONS *options);
|
||||||
int ssh_bind_listen(SSH_BIND *ssh_bind);
|
int ssh_bind_listen(SSH_BIND *ssh_bind);
|
||||||
void ssh_bind_set_blocking(SSH_BIND *ssh_bind,int blocking);
|
void ssh_bind_set_blocking(SSH_BIND *ssh_bind,int blocking);
|
||||||
int ssh_bind_get_fd(SSH_BIND *ssh_bind);
|
socket_t ssh_bind_get_fd(SSH_BIND *ssh_bind);
|
||||||
|
void ssh_bind_set_fd(SSH_BIND *ssh_bind, socket_t fd);
|
||||||
void ssh_bind_fd_toaccept(SSH_BIND *ssh_bind);
|
void ssh_bind_fd_toaccept(SSH_BIND *ssh_bind);
|
||||||
SSH_SESSION *ssh_bind_accept(SSH_BIND *ssh_bind);
|
SSH_SESSION *ssh_bind_accept(SSH_BIND *ssh_bind);
|
||||||
void ssh_bind_free(SSH_BIND *ssh_bind);
|
void ssh_bind_free(SSH_BIND *ssh_bind);
|
||||||
@ -95,3 +102,7 @@ int ssh_message_channel_request_reply_success(SSH_MESSAGE *msg);
|
|||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#endif /* SERVER_H */
|
#endif /* SERVER_H */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
@ -167,10 +167,14 @@ void ssh_bind_set_blocking(SSH_BIND *ssh_bind, int blocking) {
|
|||||||
ssh_bind->blocking = blocking ? 1 : 0;
|
ssh_bind->blocking = blocking ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ssh_bind_get_fd(SSH_BIND *ssh_bind) {
|
socket_t ssh_bind_get_fd(SSH_BIND *ssh_bind) {
|
||||||
return ssh_bind->bindfd;
|
return ssh_bind->bindfd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ssh_bind_set_fd(SSH_BIND *ssh_bind, socket_t fd) {
|
||||||
|
ssh_bind->bindfd = fd;
|
||||||
|
}
|
||||||
|
|
||||||
void ssh_bind_fd_toaccept(SSH_BIND *ssh_bind) {
|
void ssh_bind_fd_toaccept(SSH_BIND *ssh_bind) {
|
||||||
ssh_bind->toaccept = 1;
|
ssh_bind->toaccept = 1;
|
||||||
}
|
}
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user