Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Connection
- type ConnectionHandler = ConnectionName -> (Producer ByteString IO (), Consumer ByteString IO ()) -> IO ()
- data Disconnect
- connectionHandler :: TVar World -> ObjId -> Bool -> ConnectionHandler
- connectionObject :: Connection -> ObjId
- doDisconnected :: TVar World -> ObjId -> ObjId -> Disconnect -> IO ()
- firstConnectionId :: ObjId
- withConnections :: (Map ObjId Connection -> MOO a) -> MOO a
- withConnection :: ObjId -> (Connection -> MOO a) -> MOO a
- withMaybeConnection :: ObjId -> (Maybe Connection -> MOO a) -> MOO a
- connectionName :: Connection -> ConnectionName
- connectionConnectedTime :: Connection -> TVar (Maybe UTCTime)
- connectionActivityTime :: Connection -> TVar UTCTime
- connectionOutputDelimiters :: Connection -> TVar (Text, Text)
- sendToConnection :: Connection -> Text -> STM ()
- closeConnection :: Connection -> STM ()
- readFromConnection :: ObjId -> Bool -> MOO Value
- notify :: ObjId -> StrT -> MOO Bool
- notify' :: Bool -> ObjId -> StrT -> MOO Bool
- bufferedOutputLength :: Maybe Connection -> STM Int
- forceInput :: Bool -> ObjId -> StrT -> MOO ()
- flushInput :: Bool -> Connection -> STM ()
- bootPlayer :: ObjId -> MOO ()
- bootPlayer' :: Bool -> ObjId -> MOO ()
- setConnectionOption :: ObjId -> Id -> Value -> MOO ()
- getConnectionOptions :: ObjId -> MOO (Map Id Value)
Documentation
data Connection Source
type ConnectionHandler = ConnectionName -> (Producer ByteString IO (), Consumer ByteString IO ()) -> IO () Source
connectionHandler :: TVar World -> ObjId -> Bool -> ConnectionHandler Source
doDisconnected :: TVar World -> ObjId -> ObjId -> Disconnect -> IO () Source
withConnections :: (Map ObjId Connection -> MOO a) -> MOO a Source
Do something with the Map
of all active connections.
withConnection :: ObjId -> (Connection -> MOO a) -> MOO a Source
Do something with the connection for the given object, raising E_INVARG
if no such connection exists.
withMaybeConnection :: ObjId -> (Maybe Connection -> MOO a) -> MOO a Source
Do something with the connection for given object, if any.
connectionName :: Connection -> ConnectionName Source
connectionOutputDelimiters :: Connection -> TVar (Text, Text) Source
sendToConnection :: Connection -> Text -> STM () Source
closeConnection :: Connection -> STM () Source
Initiate the closing of a connection by closing its output queue.
notify' :: Bool -> ObjId -> StrT -> MOO Bool Source
Send data to a connection, optionally without flushing.
bufferedOutputLength :: Maybe Connection -> STM Int Source
Return the number of items currently buffered for output to a connection, or the maximum number of items that will be buffered up for output on any connection.
flushInput :: Bool -> Connection -> STM () Source
Flush a connection's input queue, optionally showing what was flushed.
bootPlayer :: ObjId -> MOO () Source
Close the connection associated with an object.
bootPlayer' :: Bool -> ObjId -> MOO () Source
Close the connection associated with an object, with message varying on whether the object is being recycled.