From b39079922bb4288dee30dfcb89a0fa0d20e81632 Mon Sep 17 00:00:00 2001 From: Timo Dritschler Date: Fri, 9 May 2014 18:20:11 +0200 Subject: Restructured kiro-server implementation to make it a bit more modular Added interface to kiro-client to access the memory allocated for communication Added new 'kiro_destroy_connection' to kiro-rdma package Changed interface of 'kiro_destroy_connection_context' and updated server and client accordingly Started to implement a more visual testing routine in test-server Made test-client use commandline arguments for address and port Updated Makefile --- kiro-server.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'kiro-server.h') diff --git a/kiro-server.h b/kiro-server.h index 1d85419..cb9b57c 100644 --- a/kiro-server.h +++ b/kiro-server.h @@ -76,7 +76,30 @@ GObject kiro_server_new (void); /* server functions */ -int kiro_server_start (KiroServer* server, char* bind_addr, char* bind_port); +/** + * kiro_server_start - Starts the server, providing the given memory + * @server: KIRO SERVER to perform the operation on + * @bind_addr: Local address to bind the server to + * @bind_port: Local port to listen for connections + * @mem: Pointer to the memory that is to be provided + * @mem_size: Size in bytes of the given memory + * Description: + * Starts the server to provide the given memory to any connecting + * client. + * Notes: + * If the bind_addr is NULL, the server will bind to the first device + * it can find on the machine and listen across all IPs. Otherwise it + * will try to bind to the device associated with the given address. + * Address is given as a string of either a hostname or a dot-seperated + * IPv4 address or a colon-seperated IPv6 hex-address. + * If bind_port is NULL the server will choose a free port randomly + * and return the chosen port as return value. + * If server creation fails, -1 is returned instead. + * See also: + * kiro_trb_reshape, kiro_trb_adopt, + * kiro_trb_clone + */ +int kiro_server_start (KiroServer* server, char* bind_addr, char* bind_port, void* mem, size_t mem_size); G_END_DECLS -- cgit v1.2.3