diff options
Diffstat (limited to 'camel/camel-tcp-stream-raw.c')
-rw-r--r-- | camel/camel-tcp-stream-raw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/camel/camel-tcp-stream-raw.c b/camel/camel-tcp-stream-raw.c index 2580f1a7e5..59e09080e9 100644 --- a/camel/camel-tcp-stream-raw.c +++ b/camel/camel-tcp-stream-raw.c @@ -45,6 +45,7 @@ static int stream_close (CamelStream *stream); static int stream_connect (CamelTcpStream *stream, struct hostent *host, int port); static int stream_getsockopt (CamelTcpStream *stream, CamelSockOptData *data); static int stream_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data); +static gpointer stream_get_socket (CamelTcpStream *stream); static void camel_tcp_stream_raw_class_init (CamelTcpStreamRawClass *camel_tcp_stream_raw_class) @@ -65,6 +66,7 @@ camel_tcp_stream_raw_class_init (CamelTcpStreamRawClass *camel_tcp_stream_raw_cl camel_tcp_stream_class->connect = stream_connect; camel_tcp_stream_class->getsockopt = stream_getsockopt; camel_tcp_stream_class->setsockopt = stream_setsockopt; + camel_tcp_stream_class->get_socket = stream_get_socket; } static void @@ -433,3 +435,9 @@ stream_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data) (void *) &data->value, sizeof (data->value)); } + +static gpointer +stream_get_socket (CamelTcpStream *stream) +{ + return GINT_TO_POINTER (CAMEL_TCP_STREAM_RAW (stream)->sockfd); +} |