Search Results for

    Show / Hide Table of Contents

    Class NetworkChannel.MessageFactory

    Message factory. Used for building message types and associating handlers.

    Inheritance
    Object
    NetworkChannel.MessageFactory
    Namespace: FNNLib.Messaging
    Assembly: FNNLib.dll
    Syntax
    public class MessageFactory

    Methods

    | Improve this Doc View Source

    Buffered()

    Denotes whether or not the message can be buffered

    Declaration
    public NetworkChannel.MessageFactory Buffered()
    Returns
    Type Description
    NetworkChannel.MessageFactory
    Exceptions
    Type Condition
    Exception
    | Improve this Doc View Source

    ClientConsumer(NetworkChannel.MessageFactory.ReaderClientConsumerMethod)

    Adds a client consumer that takes a reader. Cannot be mixed with typed consumers.

    Declaration
    public NetworkChannel.MessageFactory ClientConsumer(NetworkChannel.MessageFactory.ReaderClientConsumerMethod consumerMethod)
    Parameters
    Type Name Description
    NetworkChannel.MessageFactory.ReaderClientConsumerMethod consumerMethod

    The consumer method.

    Returns
    Type Description
    NetworkChannel.MessageFactory
    Exceptions
    Type Condition
    Exception
    | Improve this Doc View Source

    ClientConsumer<T>(NetworkChannel.MessageFactory.TypedClientConsumerMethod<T>)

    Adds a consumer for the client that takes the serializable object as a parameter. Cannot be mixed with reader consumers.

    Declaration
    public NetworkChannel.MessageFactory ClientConsumer<T>(NetworkChannel.MessageFactory.TypedClientConsumerMethod<T> method)
        where T : ISerializable
    Parameters
    Type Name Description
    NetworkChannel.MessageFactory.TypedClientConsumerMethod<T> method

    The consumer method to be added.

    Returns
    Type Description
    NetworkChannel.MessageFactory
    Type Parameters
    Name Description
    T

    The object type to be received. Must be compatible.

    Exceptions
    Type Condition
    Exception
    | Improve this Doc View Source

    Consumer(NetworkChannel.MessageFactory.ReaderConsumerMethod)

    Adds a consumer that takes a reader.

    Declaration
    public NetworkChannel.MessageFactory Consumer(NetworkChannel.MessageFactory.ReaderConsumerMethod consumerMethod)
    Parameters
    Type Name Description
    NetworkChannel.MessageFactory.ReaderConsumerMethod consumerMethod

    The consumer method.

    Returns
    Type Description
    NetworkChannel.MessageFactory
    Exceptions
    Type Condition
    Exception
    | Improve this Doc View Source

    Consumer<T>(NetworkChannel.MessageFactory.TypedConsumerMethod<T>)

    Add a consumer that takes the serializable object as a parameter.

    Declaration
    public NetworkChannel.MessageFactory Consumer<T>(NetworkChannel.MessageFactory.TypedConsumerMethod<T> method)
        where T : ISerializable
    Parameters
    Type Name Description
    NetworkChannel.MessageFactory.TypedConsumerMethod<T> method

    The consumer method to be added.

    Returns
    Type Description
    NetworkChannel.MessageFactory
    Type Parameters
    Name Description
    T

    The object type to be received. Must be compatible.

    | Improve this Doc View Source

    Register()

    Register the message in the channel.

    Declaration
    public void Register()
    Exceptions
    Type Condition
    Exception

    Factory is incomplete.

    | Improve this Doc View Source

    ServerConsumer(NetworkChannel.MessageFactory.ReaderServerConsumerMethod)

    Adds a server consumer that takes a reader. Cannot be mixed with typed consumers.

    Declaration
    public NetworkChannel.MessageFactory ServerConsumer(NetworkChannel.MessageFactory.ReaderServerConsumerMethod consumerMethod)
    Parameters
    Type Name Description
    NetworkChannel.MessageFactory.ReaderServerConsumerMethod consumerMethod

    The consumer method.

    Returns
    Type Description
    NetworkChannel.MessageFactory
    Exceptions
    Type Condition
    Exception
    | Improve this Doc View Source

    ServerConsumer<T>(NetworkChannel.MessageFactory.TypedServerConsumerMethod<T>)

    Adds a consumer for the server that takes the serializable object as a parameter. Cannot be mixed with reader consumers.

    Declaration
    public NetworkChannel.MessageFactory ServerConsumer<T>(NetworkChannel.MessageFactory.TypedServerConsumerMethod<T> method)
        where T : ISerializable
    Parameters
    Type Name Description
    NetworkChannel.MessageFactory.TypedServerConsumerMethod<T> method

    The consumer method to be added.

    Returns
    Type Description
    NetworkChannel.MessageFactory
    Type Parameters
    Name Description
    T

    The object type to be received. Must be compatible.

    Exceptions
    Type Condition
    Exception
    • Improve this Doc
    • View Source
    In This Article
    Back to top (C) 2020 Reece Mackie. Released under the MIT License.