gameServer/Utils.hs
changeset 4975 31da8979e5b1
parent 4972 2f9c8a12edce
child 5030 42746c5d4a80
equal deleted inserted replaced
4974:078cd026a7b1 4975:31da8979e5b1
     8 import Numeric
     8 import Numeric
     9 import Network.Socket
     9 import Network.Socket
    10 import System.IO
    10 import System.IO
    11 import qualified Data.List as List
    11 import qualified Data.List as List
    12 import Control.Monad
    12 import Control.Monad
    13 -------------------------------------------------
       
    14 import qualified Codec.Binary.Base64 as Base64
    13 import qualified Codec.Binary.Base64 as Base64
    15 import qualified Data.ByteString.Char8 as B
    14 import qualified Data.ByteString.Char8 as B
    16 import qualified Data.ByteString as BW
    15 import qualified Data.ByteString as BW
       
    16 -------------------------------------------------
    17 import CoreTypes
    17 import CoreTypes
    18 
    18 
    19 
    19 
    20 sockAddr2String :: SockAddr -> IO B.ByteString
    20 sockAddr2String :: SockAddr -> IO B.ByteString
    21 sockAddr2String (SockAddrInet _ hostAddr) = liftM B.pack $ inet_ntoa hostAddr
    21 sockAddr2String (SockAddrInet _ hostAddr) = liftM B.pack $ inet_ntoa hostAddr