Commits

ne...@samurai.com  committed ea92f66

Checkpoint.

  • Participants
  • Parent commits 4aa86f4

Comments (0)

Files changed (3)

File src/libcol/col-api.c

 col_init()
 {
     ColInstance *result = ol_alloc(sizeof(*result));
-    result->net = network_init();
+    result->net = network_init(0);
     return result;
 }
 

File src/libcol/include/net/network.h

     int foo;
 } ColNetwork;
 
-ColNetwork *network_init();
+ColNetwork *network_init(int port);
 ColStatus network_destroy(ColNetwork *net);
 
 void network_start(ColNetwork *net);

File src/libcol/net/network.c

 #include "col-internal.h"
 #include "net/network.h"
 
+/*
+ * Create a new instance of the network interface. "port" is the local TCP
+ * port to listen on; 0 means to use an ephemeral port.
+ */
 ColNetwork *
-network_init()
+network_init(int port)
 {
     ColNetwork *result = ol_alloc(sizeof(*result));
     return result;