author | Alberto Bertogli
<albertito@gmail.com> 2007-09-01 23:54:14 UTC |
committer | Alberto Bertogli
<albertito@gmail.com> 2007-09-01 23:54:14 UTC |
parent | a20c7961ce6cfd206e605fbf56c5628945adf22a |
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