git » nmdb » commit ed5cae0

Add nmdb_add_sctp_server() to the Haskell bindings.

author Alberto Bertogli
2007-09-01 23:54:14 UTC
committer Alberto Bertogli
2007-09-01 23:54:14 UTC
parent a20c7961ce6cfd206e605fbf56c5628945adf22a

Add nmdb_add_sctp_server() to the Haskell bindings.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>

bindings/haskell/Nmdb.hs +9 -0

diff --git a/bindings/haskell/Nmdb.hs b/bindings/haskell/Nmdb.hs
index 5f0b4e9..14bf979 100644
--- a/bindings/haskell/Nmdb.hs
+++ b/bindings/haskell/Nmdb.hs
@@ -6,6 +6,7 @@ module Nmdb (
 	NmdbStruct,
 	nmdbInit, nmdbFree,
 	nmdbAddTIPCServer, nmdbAddTCPServer, nmdbAddUDPServer,
+		nmdbAddSCTPServer,
 	nmdbSet, nmdbSetSync, nmdbCacheSet,
 	nmdbGet, nmdbCacheGet,
 	nmdbDel, nmdbDelSync, nmdbCacheDel,
@@ -41,6 +42,8 @@ foreign import ccall "nmdb.h nmdb_add_tcp_server" llNmdbAddTCPServer ::
 	NmdbPtr -> CString -> Int -> IO Int
 foreign import ccall "nmdb.h nmdb_add_udp_server" llNmdbAddUDPServer ::
 	NmdbPtr -> CString -> Int -> IO Int
+foreign import ccall "nmdb.h nmdb_add_sctp_server" llNmdbAddSCTPServer ::
+	NmdbPtr -> CString -> Int -> IO Int
 
 nmdbAddTIPCServer db port = do
 	r <- llNmdbAddTIPCServer db port
@@ -58,6 +61,12 @@ nmdbAddUDPServer db host port = do
 	free hstr
 	return r
 
+nmdbAddSCTPServer db host port = do
+	hstr <- newCString host
+	r <- llNmdbAddSCTPServer db hstr port
+	free hstr
+	return r
+
 -- Set functions
 foreign import ccall "nmdb.h nmdb_set" llNmdbSet ::
 	NmdbPtr -> CString -> Int -> CString -> Int -> IO Int