-- ----------------------------------------------------------------------------{- |
Module : Holumbus.Network.PortRegistry.Messages
Copyright : Copyright (C) 2008 Stefan Schmidt
License : MIT
Maintainer : Stefan Schmidt (stefanschmidt@web.de)
Stability : experimental
Portability: portable
Version : 0.1
This modules defines the messages from and to the PortRegistry.
-}-- ----------------------------------------------------------------------------moduleHolumbus.Network.PortRegistry.Messages{-# DEPRECATED "this module will be remove in the next release, please use the packages from Holumbus.Distribution.*" #-}(PortRegistryRequestStream,PortRegistryRequestPort,PortRegistryResponseStream,PortRegistryResponsePort,PortRegistryRequestMessage(..),PortRegistryResponseMessage(..))whereimportData.Binary--import Holumbus.Common.MRBinaryimportHolumbus.Network.PortimportHolumbus.Network.Messages-- ------------------------------------------------------------------------------ Ports-- ------------------------------------------------------------------------------ | The Stream for the messages TO the PortRegistry.typePortRegistryRequestStream=StreamPortRegistryRequestMessage-- | The Port for the messages TO the PortRegistry.typePortRegistryRequestPort=PortPortRegistryRequestMessage-- | The Stream for the messages FROM the PortRegistry.typePortRegistryResponseStream=StreamPortRegistryResponseMessage-- | The Port for the messages FROM the PortRegistry.typePortRegistryResponsePort=PortPortRegistryResponseMessage-- ------------------------------------------------------------------------------ Messages-- ------------------------------------------------------------------------------ | The messages TO the PortRegistry.dataPortRegistryRequestMessage=PRReqRegisterStreamNameSocketId|PRReqUnregisterStreamName|PRReqLookupStreamName|PRReqGetPorts|PRReqUnknownderiving(Show)instanceBinaryPortRegistryRequestMessagewhereput(PRReqRegistersnsoid)=putWord81>>putsn>>putsoidput(PRReqUnregistersn)=putWord82>>putsnput(PRReqLookupsn)=putWord83>>putsnput(PRReqGetPorts)=putWord84put(PRReqUnknown)=putWord80get=dot<-getWord8casetof1->get>>=\sn->get>>=\soid->return(PRReqRegistersnsoid)2->get>>=\sn->return(PRReqUnregistersn)3->get>>=\sn->return(PRReqLookupsn)4->return(PRReqGetPorts)_->return(PRReqUnknown)-- | The messages FROM the PortRegistry.dataPortRegistryResponseMessage=PRRspSuccess|PRRspLookup(MaybeSocketId)|PRRspGetPorts[(String,SocketId)]|PRRspErrorString|PRRspUnknownderiving(Show)instanceBinaryPortRegistryResponseMessagewhereput(PRRspSuccess)=putWord81put(PRRspLookupsoid)=putWord82>>putsoidput(PRRspGetPortsls)=putWord83>>putlsput(PRRspErrore)=putWord84>>puteput(PRRspUnknown)=putWord80get=dot<-getWord8casetof1->return(PRRspSuccess)2->get>>=\soid->return(PRRspLookupsoid)3->get>>=\ls->return(PRRspGetPortsls)4->get>>=\e->return(PRRspErrore)_->return(PRRspUnknown)instanceRspMsgPortRegistryResponseMessagewhereisError(PRRspError_)=TrueisError_=FalsegetErrorMsg(PRRspErrore)=egetErrorMsg_=""isUnknown(PRRspUnknown)=TrueisUnknown_=FalsemkErrorMsge=PRRspErrore