src/libpopulation.c: Added code to send individuals to peers.
[libpopulation.git] / src / population.h
index 53cd5c8..64b3d8f 100644 (file)
@@ -12,8 +12,8 @@ typedef int   (*pi_rate_f) (const void *);
 typedef void *(*pi_copy_f) (const void *);
 typedef void  (*pi_free_f) (void *);
 
-typedef int   (*pi_serialize) (void *, char **, size_t *);
-typedef void *(*pi_unserialize) (char * size_t);
+typedef int   (*pi_serialize_f) (void *, char **, size_t *);
+typedef void *(*pi_unserialize_f) (char *, size_t);
 
 /*
  * (Opaque) data types
@@ -31,6 +31,11 @@ void population_destroy (population_t *p);
  * Object configuration
  */
 int population_set_size (population_t *p, size_t population_size);
+int population_set_serialization (population_t *p,
+    pi_serialize_f serialize, pi_unserialize_f unserialize);
+
+#define POPULATION_DEFAULT_PORT "46835"
+int population_add_peer (population_t *p, const char *node, const char *port);
 
 /*
  * Methods