Added preliminary Symbian support.
[silc.git] / lib / silcutil / silcsocketstream_i.h
index 46c5ef2921ab8ed2c8db94515e5ce51ebbb7f601..50385df3bddd38233031412e16383475bf78998d 100644 (file)
@@ -44,7 +44,7 @@ typedef struct SilcSocketQosStruct {
 struct SilcSocketStreamStruct {
   const SilcStreamOps *ops;
   SilcSchedule schedule;
-  int sock;
+  SilcSocket sock;
   char *hostname;
   char *ip;
   SilcUInt16 port;
@@ -52,7 +52,14 @@ struct SilcSocketStreamStruct {
   SilcSocketQos qos;
   SilcStreamNotifier notifier;
   void *notifier_context;
-  unsigned int ipv6      : 1;
+  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 */