Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 2005 Pekka Riikonen
+ Copyright (C) 2005 - 2006 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
struct SilcSocketStreamStruct {
const SilcStreamOps *ops;
SilcSchedule schedule;
- int sock;
+ SilcSocket sock;
char *hostname;
char *ip;
SilcUInt16 port;
SilcSocketQos qos;
SilcStreamNotifier notifier;
void *notifier_context;
+ unsigned int ipv6 : 1; /* UDP IPv6 */
+ unsigned int connected : 1; /* UDP connected state */
};
+#define SILC_IS_SOCKET_STREAM(s) (s->ops == &silc_socket_stream_ops)
+#define SILC_IS_SOCKET_STREAM_UDP(s) (s->ops == &silc_socket_udp_stream_ops)
+
+extern const SilcStreamOps silc_socket_stream_ops;
+extern const SilcStreamOps silc_socket_udp_stream_ops;
+
#endif /* SILCSOCKETSTREAM_I_H */