Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 2006 - 2007 Pekka Riikonen
+ Copyright (C) 2006 - 2008 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
silc_packet_set_context(conn->stream, conn);
+ /* Save socket stream and socket into connection context */
+ conn->socket_stream = silc_packet_stream_get_stream(conn->stream);
+ silc_socket_stream_get_info(conn->socket_stream, &conn->sock, NULL,
+ NULL, NULL);
+
/** Start key exchange */
silc_fsm_next(fsm, silc_client_st_connect_key_exchange);
return SILC_FSM_CONTINUE;
/* Set the new stream to packet stream */
old = silc_packet_stream_get_stream(conn->stream);
silc_packet_stream_set_stream(conn->stream, stream);
+ conn->socket_stream = stream;
+ silc_socket_stream_get_info(conn->socket_stream, &conn->sock, NULL,
+ NULL, NULL);
silc_packet_stream_set_iv_included(conn->stream);
silc_packet_set_sid(conn->stream, 0);
return;
}
conn->stream = stream;
+ conn->socket_stream = silc_packet_stream_get_stream(stream);
+ silc_socket_stream_get_info(conn->socket_stream, &conn->sock, NULL,
+ NULL, NULL);
conn->internal->schedule = listener->schedule;
silc_packet_set_context(conn->stream, conn);
Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 2000 - 2007 Pekka Riikonen
+ Copyright (C) 2000 - 2008 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
SilcPublicKey public_key; /* Public key used in this connection */
SilcPrivateKey private_key; /* Private key */
SilcPacketStream stream; /* Connection to remote host */
+ SilcStream socket_stream; /* Socket stream from 'stream' */
+ SilcSocket sock; /* The socket from 'socket_stream' */
SilcConnectionType type; /* Connection type */
SilcClientConnectCallback callback; /* Connection callback */
void *callback_context; /* Connection context */