5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 2005 Pekka Riikonen
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; version 2 of the License.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
20 #include "silcincludes.h"
26 int silc_stream_read(SilcStream stream, unsigned char *buf,
29 SilcStreamHeader h = stream;
30 return h->ops->read(stream, buf, buf_len);
33 int silc_stream_write(SilcStream stream, const unsigned char *data,
36 SilcStreamHeader h = stream;
37 return h->ops->write(stream, data, data_len);
40 bool silc_stream_close(SilcStream stream)
42 SilcStreamHeader h = stream;
43 return h->ops->close(stream);
46 void silc_stream_destroy(SilcStream stream)
48 SilcStreamHeader h = stream;
49 return h->ops->destroy(stream);
52 void silc_stream_set_notifier(SilcStream stream, SilcStreamNotifier notifier,
55 SilcStreamHeader h = stream;
56 return h->ops->notifier(stream, notifier, context);