mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
ssh_accept() implementation begining in server.c
it just accepts a socket and send a banner right now. git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@5 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -127,6 +127,7 @@ SSH_SESSION *ssh_bind_accept(SSH_BIND *ssh_bind){
|
|||||||
session=ssh_new(ssh_options_copy(ssh_bind->options));
|
session=ssh_new(ssh_options_copy(ssh_bind->options));
|
||||||
session->server=1;
|
session->server=1;
|
||||||
session->fd=fd;
|
session->fd=fd;
|
||||||
|
session->options=ssh_options_copy(ssh_bind->options);
|
||||||
return session;
|
return session;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ int main(int argc, char **argv){
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
printf("Socket connecté : %d\n",ssh_get_fd(session));
|
printf("Socket connecté : %d\n",ssh_get_fd(session));
|
||||||
|
ssh_accept(session);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user