Click here to Skip to main content
15,895,746 members
Articles / Programming Languages / C#

Web-Cam SecureChat

Rate me:
Please Sign up or sign in to vote.
4.94/5 (16 votes)
12 Mar 2010CPOL6 min read 93.9K   7.4K   70  
This article will explain how to create a simple chat program using this remoting technology, which supports web-cam and sending files.
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>Pfz.Remoting</name>
    </assembly>
    <members>
        <member name="T:Pfz.Remoting.NamedPipeListener">
            <summary>
            This class works as a TcpListener, but uses named pipes to work.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.IListener">
            <summary>
            Interface used by listener to accepts new connections.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.IListener.Start">
            <summary>
            Starts the listener.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.IListener.Accept(Pfz.Box{System.Object})">
            <summary>
            Accepts a new connection.
            If connectionBox is different than null, it's value will be set
            to the real connection that created the stream.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.IListener.CreateChanneller(System.IO.Stream,System.EventHandler{Pfz.Remoting.ChannelCreatedEventArgs})">
            <summary>
            Creates an apropriate channeller over a stream created by this listener.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.NamedPipeListener.#ctor(System.String)">
            <summary>
            Creates a new NamedPipeListener using the specified pipeName.
            Do not put a server name, as this class must only be used for local
            connections.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.NamedPipeListener.Dispose(System.Boolean)">
            <summary>
            Closes the listener stream.
            This does not affect accepted streams.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.NamedPipeListener.Accept(Pfz.Box{System.Object})">
            <summary>
            Accepts a new connection and return the stream for it.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.NamedPipeListener.CreateChanneller(System.IO.Stream,System.EventHandler{Pfz.Remoting.ChannelCreatedEventArgs})">
            <summary>
            Creates a NamedPipeChanneller over the given stream.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.Internal.WrapperEventHandler">
            <summary>
            This delegate is used internally by generated wrappers, but must
            be public as the generated wrappers are other DLLs that reference
            this one. You may never need to use this delegate.
            </summary>
            <param name="sourceEventInfo"></param>
            <param name="objectId"></param>
            <param name="parameters"></param>
        </member>
        <member name="T:Pfz.Remoting.TcpListenerWrapper">
            <summary>
            Wraps a TcpListener class so it can be viewed as an IListener interface.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.TcpListenerWrapper.#ctor(System.Net.Sockets.TcpListener,System.Boolean)">
            <summary>
            Creates a new wrapper over the given TcpListener.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.TcpListenerWrapper.Dispose">
            <summary>
            Stops the listener.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.TcpListenerWrapper.Accept(Pfz.Box{System.Object})">
            <summary>
            Accepts a new socket.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.TcpListenerWrapper.Start">
            <summary>
            Starts listening.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.TcpListenerWrapper.CreateChanneller(System.IO.Stream,System.EventHandler{Pfz.Remoting.ChannelCreatedEventArgs})">
            <summary>
            Creates a stream channeler.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.TcpListenerWrapper.CanThrow">
            <summary>
            Used as the CanThrow parameter of the stream channeller.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.NamedPipeChanneller">
            <summary>
            Channeller that uses NamedPipes to create new channels.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.IChanneller">
            <summary>
            Interface that must be implemented by Channellers (objects that
            creates many channels of communication).
            Actually, the implementers are StreamChanneller, which creates many
            channels over a stream and NamedPipeChanneller, which creates many
            channels by creating new named-pipes.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.IChanneller.CreateChannel">
            <summary>
            Creates a new channel.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.IChanneller.CreateChannel(System.Object)">
            <summary>
            Creates a new channel, passing the given data as the initial
            parameter.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.IChanneller.Disposed">
            <summary>
            Event invoked when the channeller is disposed.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.IChanneller.RemoteChannelCreated">
            <summary>
            Event invoked when a channel is created on the remote side.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.NamedPipeChanneller.#ctor(System.IO.Stream,System.EventHandler{Pfz.Remoting.ChannelCreatedEventArgs})">
            <summary>
            Creates a new NamedPipeChanneller using the given stream as the
            "listener" stream.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.NamedPipeChanneller.Dispose(System.Boolean)">
            <summary>
            Disposes the base stream.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.NamedPipeChanneller.CreateChannel">
            <summary>
            Creates a new channel.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.NamedPipeChanneller.CreateChannel(System.Object)">
            <summary>
            Creates a new channel sending initial data to it.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.NamedPipeChanneller.BaseStream">
            <summary>
            Gets the base (listener) stream.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.NamedPipeChanneller.Disposed">
            <summary>
            Event invoked just after this channeller is disposed.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.NamedPipeChanneller.RemoteChannelCreated">
            <summary>
            Event invoked when a channel is created by the remote side.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.CryptographyMode">
            <summary>
            Enum used to tell if cryptography is optional, forbidden or required.
            </summary>
        </member>
        <member name="F:Pfz.Remoting.CryptographyMode.Optional">
            <summary>
            Sets the cryptography mode to optional.
            </summary>
        </member>
        <member name="F:Pfz.Remoting.CryptographyMode.Forbidden">
            <summary>
            Sets the cryptography mode to Forbidden. Cryptography can't be used.
            </summary>
        </member>
        <member name="F:Pfz.Remoting.CryptographyMode.Required">
            <summary>
            Sets the cryptography mode to Required.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.RemotingException">
            <summary>
            Exception thrown by the remoting framework when something wrong happens.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.RemotingException.#ctor">
            <summary>
            Only following the Exception pattern.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.RemotingException.#ctor(System.String)">
            <summary>
            Only following the Exception pattern.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.RemotingException.#ctor(System.String,System.Exception)">
            <summary>
            Only following the Exception pattern.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.RemotingException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
            <summary>
            Only following the Exception pattern.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.NamedPipeClient">
            <summary>
            Static class capable of creating DuplexStreams that connects to a named
            pipe listener. Note that listeners are capable of accepting many clients,
            while the NamedPipeServerStream only accepts one client.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.NamedPipeClient.Connect(System.String)">
            <summary>
            Creates a duplex-stream connecting it to the given listener.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.GettingStreamEventArgs">
            <summary>
            Argument passed when RemotingServer and RemotingClients are getting or just
            got the stream they will use.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.GettingStreamEventArgs.Stream">
            <summary>
            The stream to use.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.RemotingClient">
            <summary>
            The main class for clients that depends on remote objects.
            This class is able to connect to a remoting server, and accepts
            bidirectional calls to the remote objects. The bidirectional calls
            occur when the client pass a local object by interface to the server,
            or when it registers itself into an event in a server object.
            
            Remember that the remoting is only done to the interfaces.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.RemotingClient.ConnectToNamedPipeListener(System.String)">
            <summary>
            Creates a new RemotingClient connecting to the given NamedPipeListener.
            Note that a NamedPipeServerStream is not a NamedPipeListener. Listener accepts
            many connections.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.RemotingClient.#ctor(System.String,System.Int32)">
            <summary>
            Creates the remoting client, connecting to the specified host and port.
            </summary>
            <param name="host">The server host.</param>
            <param name="port">The server port. If 0 is used, the server host will be treated as a named-pipe.</param>
        </member>
        <member name="M:Pfz.Remoting.RemotingClient.#ctor(Pfz.Remoting.RemotingParameters)">
            <summary>
            Creates the remoting client, connecting to the specified host and port,
            and allows you to tell if the reconnections will be automatic.
            </summary>
            <param name="parameters">The parameters used to initialize this remoting client.</param>
        </member>
        <member name="M:Pfz.Remoting.RemotingClient.Dispose(System.Boolean)">
            <summary>
            Closes the tcp/connection required by this remoting object and makes
            the object unusable.
            </summary>
            <param name="disposing">True if invoked from Dispose() and false if invoked from destructor.</param>
        </member>
        <member name="M:Pfz.Remoting.RemotingClient.GetFromRemoteObject(System.Object)">
            <summary>
            Gets the RemotingClient that created the actual remote-object
            wrapper, or null if this object is not remote.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.RemotingClient.Create``1(System.Object[])">
            <summary>
            Creates an object on the server, registered as the default implementor
            of the specified T interface.
            </summary>
            <typeparam name="T">The interface to create a remote object for.</typeparam>
            <param name="parameters">The constructor parameters</param>
            <returns>An object that implements the specified interface.</returns>
        </member>
        <member name="M:Pfz.Remoting.RemotingClient.Create(System.String,System.Object[])">
            <summary>
            Creates a remote object by the specified name and parameters.
            </summary>
            <param name="serverObjectName">The name of the registered server type.</param>
            <param name="parameters">The constructor parameters to create the object.</param>
            <returns>An object with all the interfaces implemented by the remote object, as redirectors to that real object.</returns>
        </member>
        <member name="M:Pfz.Remoting.RemotingClient.InvokeStaticMethod(System.String,System.Object[])">
            <summary>
            Invokes an static method registered on the server.
            </summary>
            <param name="methodName">The registered method name.</param>
            <param name="parameters">The parameters needed by the method.</param>
            <returns>The possible result of such method.</returns>
        </member>
        <member name="M:Pfz.Remoting.RemotingClient.CreateUserChannel">
            <summary>
            Creates a new channel inside the tcp/ip connection used by this
            client, but does not controls it. It's free to be used by the user.
            </summary>
            <returns>A new channel that must be used by the user.</returns>
        </member>
        <member name="M:Pfz.Remoting.RemotingClient.CreateUserChannel(System.Object)">
            <summary>
            Creates a new channel inside the tcp/ip connection used by this
            client, but does not controls it. It's free to be used by the user.
            </summary>
            <param name="serializableData">Data to send during channel creation. Must be serializable.</param>
            <returns>A new channel that must be used by the user.</returns>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.Disposed">
            <summary>
            Event invoked when the object is being disposed.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.RemotingClient.MustUseAsyncVoidCalls">
            <summary>
            Set this property to true if you want to call voids asynchronously.
            This also avoids receiving exceptions from such calls.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.RemotingClient.MustDisposeAllOnConnectionLost">
            <summary>
            Gets or sets a property indicating that objects that were remoted
            must be disposed when the connection is lost.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.RemotingClient.CanTryToReconnectAfterConnectionLost">
            <summary>
            If true, the object will automatically try to reconnect when the connection
            is lost. If false, the object will become unusable when the connection is lost.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.RemotingClient.Cryptography">
            <summary>
            Gets the remoting cryptography being used.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.RemotingClient.BaseConnection">
            <summary>
            Gets the object that represents the real connection of this
            remoting client. This can be a DuplexStream of NamedPipes
            or a TcpClient.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.UserChannelCreated">
            <summary>
            Event called in a new thread when a client channel is created by a 
            request on the other side.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.BeforeInvokeLocalMethod">
            <summary>
            Event called just before a remote call invokes a local method.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.AfterInvokeLocalMethod">
            <summary>
            Event called just after invoking a local method from a remote call.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.BeforeInvokeRemoteMethod">
            <summary>
            Event called just before a local method is redirected to a remote invoke.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.AfterInvokeRemoteMethod">
            <summary>
            Event called just after the remote method was executed.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.BeforeInvokeLocalPropertyGet">
            <summary>
            Event called just before a remote call invokes a local property get.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.AfterInvokeLocalPropertyGet">
            <summary>
            Event called just after a remote call invokes a local property get.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.BeforeInvokeRemotePropertyGet">
            <summary>
            Event called just before redirecting a property get to a remote object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.AfterInvokeRemotePropertyGet">
            <summary>
            Event called just after redirecting a property get to a remote object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.BeforeInvokeLocalPropertySet">
            <summary>
            Event called just before a remote call invokes a local property set.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.AfterInvokeLocalPropertySet">
            <summary>
            Event called just after a remote call invokes a local property set.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.BeforeInvokeRemotePropertySet">
            <summary>
            Event called just before redirecting a property set to a remote object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.AfterInvokeRemotePropertySet">
            <summary>
            Event called just after redirecting a property set to a remote object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.BeforeInvokeLocalEventAdd">
            <summary>
            Event called just before a remote call adds an event handler to a local object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.AfterInvokeLocalEventAdd">
            <summary>
            Event called just after a remote call adds an event handler to a local object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.BeforeInvokeRemoteEventAdd">
            <summary>
            Event called just before redirecting an event add to a remote object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.AfterInvokeRemoteEventAdd">
            <summary>
            Event called just after redirecting an event add to a remote object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.BeforeInvokeLocalEventRemove">
            <summary>
            Event called just before a remote call removes an event handler from a local object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.AfterInvokeLocalEventRemove">
            <summary>
            Event called just after a remote call removes an event handler from a local object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.BeforeInvokeRemoteEventRemove">
            <summary>
            Event called just before an event remove is redirected to a remote object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingClient.AfterInvokeRemoteEventRemove">
            <summary>
            Event called just after an event remove is redirected to a remote object.
            </summary>
        </member>
        <member name="F:Pfz.Remoting.RemotingClient.InvokeType.EventLost">
            <summary>
            Happens when the component for which the event was registered removed the event,
            like when it is disposed and clears the events list.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.ChannelCreatedEventArgs">
            <summary>
            Argument class used as the parameter by the StreamChanneller, when
            a channel is created as a request from the remote site.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.ChannelCreatedEventArgs.#ctor">
            <summary>
            Creates a new instance of ChannelCreatedEventArgs.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.ChannelCreatedEventArgs.Channel">
            <summary>
            The channel that was just created.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.ChannelCreatedEventArgs.Data">
            <summary>
            Data sent by the other side when asking for a new channel.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.ChannelCreatedEventArgs.CanDisposeChannel">
            <summary>
            Gets or sets a flag allowing to dispose the channel as soon the events
            are all processed. By default this value is true, as the channel is useless
            after the thread that processes it finishes. But, if the user wants to keep
            the channel open to use it by another thread, it must set this to false.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.StreamChanneller">
            <summary>
            Class responsible for creating many channels inside another stream.
            This is used by the remoting framework, so each thread has it's own
            channel inside a single tcp/ip connection.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.StreamChanneller.#ctor(System.IO.Stream,System.EventHandler{Pfz.Remoting.ChannelCreatedEventArgs})">
            <summary>
            Creates the channeller for the specified stream.
            </summary>
            <param name="stream">The stream to channel.</param>
            <param name="remoteChannelCreated">
            Handler to invoke when a channel is created as a request from the other side.
            </param>
        </member>
        <member name="M:Pfz.Remoting.StreamChanneller.#ctor(System.IO.Stream,System.EventHandler{Pfz.Remoting.ChannelCreatedEventArgs},System.Int32)">
            <summary>
            Creates the channeller for the specified stream and allows you to
            specify the buffer size. For tcp/ip stream, use the bigger value
            between receive an send buffer size.
            </summary>
            <param name="stream">The stream to channel.</param>
            <param name="remoteChannelCreated">
            Handler to invoke when a channel is created as a request from the other side.
            </param>
            <param name="bufferSizePerChannel">The buffer size used when receiving and sending to each channel.</param>
        </member>
        <member name="M:Pfz.Remoting.StreamChanneller.#ctor(System.IO.Stream,System.EventHandler{Pfz.Remoting.ChannelCreatedEventArgs},System.Int32,System.Boolean)">
            <summary>
            Creates the channeller for the specified stream and allows you to
            specify the buffer size. For tcp/ip stream, use the bigger value
            between receive an send buffer size.
            </summary>
            <param name="stream">The stream to channel.</param>
            <param name="remoteChannelCreated">
            Handler to invoke when a channel is created as a request from the other side.
            It is invoked in a separate exclusive thread. You don't need to create one.
            </param>
            <param name="canThrow">
            If true (the default value) can throw exception while reading.
            If false, only disposes the object but does not throw an exception.
            </param>
            <param name="bufferSizePerChannel">The buffer size used when receiving and sending to each channel.</param>
        </member>
        <member name="M:Pfz.Remoting.StreamChanneller.Dispose(System.Boolean)">
            <summary>
            Disposes the channeller and the stream.
            </summary>
            <param name="disposing">true if called from Dispose() and false if called from destructor.</param>
        </member>
        <member name="M:Pfz.Remoting.StreamChanneller.CreateChannel">
            <summary>
            Creates a new channel.
            </summary>
            <returns>Returns a new channel inside the stream.</returns>
        </member>
        <member name="M:Pfz.Remoting.StreamChanneller.CreateChannel(System.Object)">
            <summary>
            Creates a channel, sending the serializableData parameter to the
            other side, so it can decide what to do with this channel before it
            gets used (this avoids an extra tcp/ip packet for small information).
            </summary>
            <param name="serializableData">Data to send to the other side.</param>
            <returns>A new channel.</returns>
        </member>
        <member name="E:Pfz.Remoting.StreamChanneller.Disposed">
            <summary>
            Event called when Dispose() has just finished.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.StreamChanneller.RemoteChannelCreated">
            <summary>
            Event that is invoked when the remote side creates a new channel.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.RemotingServer">
            <summary>
            Remoting server class.
            In it, you register the classes you want to provide remoting for and
            the static methods. The remoting is done via interfaces, so methods
            and properites that are not visible by the interfaces cannot be used.
            Objects returned as interfaces are also remoted, but object that are
            returned by the real type are serialized, if possible, or an exception
            is thrown.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.RemotingServer.#ctor">
            <summary>
            Creates the server.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.RemotingServer.Dispose(System.Boolean)">
            <summary>
            Stops the server and frees all it's resources.
            </summary>
            <param name="disposing">
            true if called from Dispose(), and false if called from destructor.
            </param>
        </member>
        <member name="M:Pfz.Remoting.RemotingServer.Register(System.Type,System.Type)">
            <summary>
            Registers using the interface.FullName as the name param.
            </summary>
            <param name="interfaceType">The type of interface to register.</param>
            <param name="classType">The type of object that will be used for such interface.</param>
        </member>
        <member name="M:Pfz.Remoting.RemotingServer.Register(System.String,System.Type)">
            <summary>
            Registers a type to be instantiated when the specified name is 
            requested. But remember, only the interfaces are acessible by the
            client, not the real class.
            </summary>
            <param name="name">The name to register to be acessible by clients.</param>
            <param name="type">An instantiable type.</param>
        </member>
        <member name="M:Pfz.Remoting.RemotingServer.RegisterStaticMethod(System.Reflection.MethodInfo)">
            <summary>
            Registers an static method, using only it's name as the way to be
            acessible by clients.
            </summary>
            <param name="method">The static method to register.</param>
        </member>
        <member name="M:Pfz.Remoting.RemotingServer.RegisterStaticMethod(System.String,System.Reflection.MethodInfo)">
            <summary>
            Registers an static method with the specified name.
            This is useful if you have two static methods with the same name,
            as you can't register them that way.
            </summary>
            <param name="name">The name to register the method to be acessible by clients.</param>
            <param name="method">The static method that will be registered.</param>
        </member>
        <member name="M:Pfz.Remoting.RemotingServer.AddForcedSerialization(System.Type)">
            <summary>
            Adds a class type (and it's sub-classes) to be serialized, even
            when it is requested as an interface.
            </summary>
            <param name="type">The base type to be always serialized.</param>
        </member>
        <member name="M:Pfz.Remoting.RemotingServer.RegisterAcceptedCryptography``1">
            <summary>
            Registers valid cryptographies. If none is registered, all cryptographies
            are considered valid.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.RemotingServer.Run(System.Int32)">
            <summary>
            Starts the server on the given port.
            This method will only return when the server is disposed, so
            it's a good practice to call this method from another thread.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.RemotingServer.Run(System.Net.Sockets.TcpListener)">
            <summary>
            Starts the server using the given TcpListener, which must
            not be started.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.RemotingServer.Run(Pfz.Remoting.IListener)">
            <summary>
            Starts the server using the given IListener, which must
            not be started.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.RemotingServer.CreateNamedPipeConnection(System.String)">
            <summary>
            Creates a connection using a named pipe.
            Returns a delegate to start the connection, so you can do some
            work before starting to wait for the client.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.RemotingServer.MustDisposeAllOnConnectionLost">
            <summary>
            Gets or sets a property indicating that objects that were remoted
            must be disposed when the connection is lost.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.RemotingServer.MustUseAsyncVoidCalls">
            <summary>
            Set this property to true if you want to call voids asynchronously.
            This also avoids receiving exceptions from such calls.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.RemotingServer.CryptographyMode">
            <summary>
            Gets the cryptography mode used by this server.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.UserChannelCreated">
            <summary>
            Event called in a new thread when a client channel is created by a 
            request on the other side.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.GettingStream">
            <summary>
            Event called just before the stream begins to be used.
            The Stream parameter is the default tcp/ip stream by default, but
            you can modify it.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.BeforeInvokeLocalMethod">
            <summary>
            Event called just before a remote call invokes a local method.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.AfterInvokeLocalMethod">
            <summary>
            Event called just after invoking a local method from a remote call.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.BeforeInvokeRemoteMethod">
            <summary>
            Event called just before a local method is redirected to a remote invoke.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.AfterInvokeRemoteMethod">
            <summary>
            Event called just after the remote method was executed.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.BeforeInvokeLocalPropertyGet">
            <summary>
            Event called just before a remote call invokes a local property get.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.AfterInvokeLocalPropertyGet">
            <summary>
            Event called just after a remote call invokes a local property get.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.BeforeInvokeRemotePropertyGet">
            <summary>
            Event called just before redirecting a property get to a remote object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.AfterInvokeRemotePropertyGet">
            <summary>
            Event called just after redirecting a property get to a remote object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.BeforeInvokeLocalPropertySet">
            <summary>
            Event called just before a remote call invokes a local property set.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.AfterInvokeLocalPropertySet">
            <summary>
            Event called just after a remote call invokes a local property set.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.BeforeInvokeRemotePropertySet">
            <summary>
            Event called just before redirecting a property set to a remote object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.AfterInvokeRemotePropertySet">
            <summary>
            Event called just after redirecting a property set to a remote object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.BeforeInvokeLocalEventAdd">
            <summary>
            Event called just before a remote call adds an event handler to a local object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.AfterInvokeLocalEventAdd">
            <summary>
            Event called just after a remote call adds an event handler to a local object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.BeforeInvokeRemoteEventAdd">
            <summary>
            Event called just before redirecting an event add to a remote object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.AfterInvokeRemoteEventAdd">
            <summary>
            Event called just after redirecting an event add to a remote object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.BeforeInvokeLocalEventRemove">
            <summary>
            Event called just before a remote call removes an event handler from a local object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.AfterInvokeLocalEventRemove">
            <summary>
            Event called just after a remote call removes an event handler from a local object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.BeforeInvokeRemoteEventRemove">
            <summary>
            Event called just before an event remove is redirected to a remote object.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingServer.AfterInvokeRemoteEventRemove">
            <summary>
            Event called just after an event remove is redirected to a remote object.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.Internal.RemotingInterfaceWrapper">
            <summary>
            Each time a remote object is created, a client wrapper is also created,
            and they are all inheritors of this class. This class is only public to
            be acessible by CodeDOM, but is not intended for users to implement.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.Internal.RemotingInterfaceWrapper.Finalize">
            <summary>
            Informs the remote side that the real object can now be collected.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.Internal.RemotingInterfaceWrapper.InvokeMethod(System.Reflection.MethodInfo,System.Object[])">
            <summary>
            Redirects a method call to the remote object.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.Internal.RemotingInterfaceWrapper.InvokePropertyGet(System.Reflection.PropertyInfo,System.Object[])">
            <summary>
            Redirects a property get call to the remote object.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.Internal.RemotingInterfaceWrapper.InvokePropertySet(System.Reflection.PropertyInfo,System.Object[],System.Object)">
            <summary>
            Redirects a property set call to the remote object.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.Internal.RemotingInterfaceWrapper.InvokeEventAdd(System.Reflection.EventInfo,System.Delegate)">
            <summary>
            Redirects an event add call to the remote object.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.Internal.RemotingInterfaceWrapper.InvokeEventRemove(System.Reflection.EventInfo,System.Delegate)">
            <summary>
            Redirects an event remove call to the remote object.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.Internal.RemotingInterfaceWrapper.CheckUndisposed">
            <summary>
            Throws an exception if the object was disposed.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.Channel">
            <summary>
            Represents a "Channel" inside a StreamChanneller. This is used by the remoting
            mechanism to separate each thread communication channel inside a single tcp/ip
            connection.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.Channel.OnDispose(System.Boolean)">
            <summary>
            Frees all needed resources and informs the remote side.
            </summary>
            <param name="disposing">True if called from Dispose()</param>
        </member>
        <member name="M:Pfz.Remoting.Channel.Flush">
            <summary>
            Sends all buffered data to the stream.
            </summary>
            
        </member>
        <member name="M:Pfz.Remoting.Channel.Read(System.Byte[],System.Int32,System.Int32)">
            <summary>
            Reads bytes from the channel.
            </summary>
            <param name="buffer">The buffer to store the read data.</param>
            <param name="offset">The initial position to store data in the buffer.</param>
            <param name="count">The number of bytes expected to read.</param>
            <returns>The number of bytes actually read.</returns>
        </member>
        <member name="M:Pfz.Remoting.Channel.Write(System.Byte[],System.Int32,System.Int32)">
            <summary>
            Writes bytes into this channel.
            </summary>
            <param name="buffer">The buffer to get bytes to write.</param>
            <param name="offset">The initial position in the buffer to send.</param>
            <param name="count">The number of bytes from the buffer to send.</param>
        </member>
        <member name="M:Pfz.Remoting.Channel.Seek(System.Int64,System.IO.SeekOrigin)">
            <summary>
            Method from Stream. Throws a NotSupportedException.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.Channel.SetLength(System.Int64)">
            <summary>
            Method from Stream. Throws a NotSupportedException.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.Channel.Id">
            <summary>
            Gets the Id given to this channel locally.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.Channel.RemoteId">
            <summary>
            Gets the Id given to this channel by the remote host.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.Channel.Channeller">
            <summary>
            Gets the channeller to which this channel belongs to.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.Channel.Length">
            <summary>
            Property from Stream. Always returns -1.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.Channel.Position">
            <summary>
            Property from Stream. Always returns -1 and throws a NotSupportedException
            if set.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.Channel.CanRead">
            <summary>
            Property from Stream. Always return true.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.Channel.CanSeek">
            <summary>
            Property from Stream. Always return false.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.Channel.CanWrite">
            <summary>
            Property from Stream. Always return true.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.DuplexStream">
            <summary>
            Helper class to create the DuplexStream generic class.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.DuplexStream.Create``1(``0,``0)">
            <summary>
            Creates a new Duplex stream using the given stream.
            Method useful when you don't want to type the full name of the
            stream.
            Example: var duplexStream = DuplexStream.Create(readStream, writeStream);
            </summary>
        </member>
        <member name="M:Pfz.Remoting.DuplexStream.CreateNamedPipeServer(System.String,System.Boolean)">
            <summary>
            Creates a full duplex named pipe server.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.DuplexStream.CreateNamedPipeClient(System.String,System.String,System.Boolean)">
            <summary>
            Creates a full duplex named pipe client.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.DuplexStream`1">
            <summary>
            This class creates a "duplex" stream using two other streams,
            which one must be capable of reading and the other of writing.
            This class is used when working with NamedPipes, as if the server and the
            client try to read at the same time the custom namepipe will not work.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.DuplexStream`1.#ctor(`0,`0)">
            <summary>
            Creates the duplex stream using one stream to read and one to write.
            The other side must use the stream in the opposite order.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.DuplexStream`1.OnDispose(System.Boolean)">
            <summary>
            Releases the read and write streams.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.DuplexStream`1.Flush">
            <summary>
            Flushes the write stream.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.DuplexStream`1.Read(System.Byte[],System.Int32,System.Int32)">
            <summary>
            Reads from the ReadStream.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.DuplexStream`1.Write(System.Byte[],System.Int32,System.Int32)">
            <summary>
            Writes to the WriteStream.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.DuplexStream`1.Seek(System.Int64,System.IO.SeekOrigin)">
            <summary>
            Throws NotSupportedException.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.DuplexStream`1.SetLength(System.Int64)">
            <summary>
            Throws NotSupportedException.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.DuplexStream`1.ReadStream">
            <summary>
            Gets the stream used for reading.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.DuplexStream`1.WriteStream">
            <summary>
            Gets the stream used for writing.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.DuplexStream`1.CanRead">
            <summary>
            Always returns true.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.DuplexStream`1.CanWrite">
            <summary>
            Always returns true.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.DuplexStream`1.CanSeek">
            <summary>
            Always returns false.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.DuplexStream`1.Length">
            <summary>
            Throws NotSupportedException.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.DuplexStream`1.Position">
            <summary>
            Throws NotSupportedException.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.SecureStream">
            <summary>
            This is a class that transforms a simple (non-encrypted) stream into an
            encrypted one. <br/>
            It does: Create an assymetric private key (on server), sends the public
            part to the client and, then, the client creates a new symmetric key that 
            is known is sent to the server using the asmmetric key.<br/>
            After that, only the symmetric algorithm is used, as it is faster,
            but it is guaranteed that only the server and the client knows the key.<br/>
            This cryptography guarantees that no one "sniffing" the network would be
            able to interpret the messages, but does not guarantees that the requested
            host is really the host it should be. To that additional verification,
            you would probably need to deal with certificates and the SslStream.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.SecureStream.#ctor(System.IO.Stream)">
            <summary>
            Creates a new secure stream (stream that uses an assymetric key to
            initialize and then a symmetric key to continue it's work) over another
            stream, without any other parameters, so, running as client.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.SecureStream.#ctor(System.IO.Stream,System.Boolean)">
            <summary>
            Creates a new secure stream (stream that uses an assymetric key to
            initialize and then a symmetric key to continue it's work) over another
            stream, specifying if running as client or server, but without changing
            the default symmetric or assymetric class/algorithm..
            </summary>
        </member>
        <member name="M:Pfz.Remoting.SecureStream.#ctor(System.IO.Stream,System.Security.Cryptography.SymmetricAlgorithm)">
            <summary>
            Creates a new secure stream (stream that uses an assymetric key to
            initialize and then a symmetric key to continue it's work) over another
            stream. <br/>
            Species the symmetricAlgorithm to use.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.SecureStream.#ctor(System.IO.Stream,System.Security.Cryptography.SymmetricAlgorithm,System.Boolean)">
            <summary>
            Creates a new secure stream (stream that uses an assymetric key to
            initialize and then a symmetric key to continue it's work) over another
            stream. <br/>
            Species the symmetricAlgorithm to use and if it runs as a client or server.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.SecureStream.#ctor(System.IO.Stream,System.Security.Cryptography.RSACryptoServiceProvider,System.Security.Cryptography.SymmetricAlgorithm,System.Boolean)">
            <summary>
            Creates a new secure stream (stream that uses an assymetric key to
            initialize and then a symmetric key to continue it's work) over another
            stream. <br/>
            Specifies the assymetric and the symmetric algorithm to use, and if it 
            must run as client or server.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.SecureStream.#ctor(System.IO.Stream,System.Security.Cryptography.RSACryptoServiceProvider,System.Security.Cryptography.SymmetricAlgorithm,System.Boolean,System.Int32)">
            <summary>
            Creates a new secure stream (stream that uses an assymetric key to
            initialize and then a symmetric key to continue it's work) over another
            stream. <br/>
            Specifies the assymetric and the symmetric algorithm to use, if it 
            must run as client or server and the writeBufferInitialLength.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.SecureStream.Dispose(System.Boolean)">
            <summary>
            Releases the buffers, the basestream and the cryptographic classes.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.SecureStream.Read(System.Byte[],System.Int32,System.Int32)">
            <summary>
            Reads and decryptographs the given number of bytes from the buffer.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.SecureStream.Seek(System.Int64,System.IO.SeekOrigin)">
            <summary>
            Throws a NotSupportedException.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.SecureStream.SetLength(System.Int64)">
            <summary>
            Throws a NotSupportedException.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.SecureStream.Write(System.Byte[],System.Int32,System.Int32)">
            <summary>
            Encrypts and writes the given bytes.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.SecureStream.Flush">
            <summary>
            Sends all the buffered data.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.SecureStream.BaseStream">
            <summary>
            Gets the original stream that created this asymmetric crypto stream.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.SecureStream.SymmetricAlgorithm">
            <summary>
            Gets the symmetric algorithm being used.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.SecureStream.Decryptor">
            <summary>
            Gets the encryptor being used.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.SecureStream.Encryptor">
            <summary>
            Gets the decryptor being used.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.SecureStream.CanRead">
            <summary>
            Always returns true.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.SecureStream.CanSeek">
            <summary>
            Always returns false.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.SecureStream.CanWrite">
            <summary>
            Always returns true.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.SecureStream.Length">
            <summary>
            Throws a NotSupportedException.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.SecureStream.Position">
            <summary>
            Throws a NotSupportedException.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.HandshakingEventArgs">
            <summary>
            Class used as the parameter for the Handshaking event of the 
            RemotingParameters class.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.HandshakingEventArgs.ServerCryptographyMode">
            <summary>
            Gets the CryptographyMode set on the server side.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.HandshakingEventArgs.ServerAcceptedCryptographies">
            <summary>
            Gets a dictionary where the keys are the assembly full names.
            Each item is a collection of the full-type name of the algorithms 
            accepted for cryptography.
            If all cryptographies are accepted, this returns a null value.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.HandshakingEventArgs.ServerForcedSerializations">
            <summary>
            Gets a dictionary where the keys are the assembly full names.
            Each item is a collection of the full-type name of the type being
            serialized even when requested as interface.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.HandshakingEventArgs.ServerMustUseAsyncVoidCalls">
            <summary>
            Gets the MustUseAsyncVoidCalls present in the server.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.HandshakingEventArgs.Cryptography">
            <summary>
            Gets or sets the cryptography used in the client.
            A client can be created without cryptography and, during this event,
            instantiate the cryptographic class if the server requires cryptography.
            </summary>
        </member>
        <member name="T:Pfz.Remoting.RemotingParameters">
            <summary>
            Class used as the initialization parameters for the RemotingClient.
            </summary>
        </member>
        <member name="M:Pfz.Remoting.RemotingParameters.#ctor(System.String,System.Int32)">
            <summary>
            Initializes a new RemotingParameters instance setting only the
            host and port.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.RemotingParameters.Host">
            <summary>
            Gets the name or IP of the host.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.RemotingParameters.Port">
            <summary>
            Gets the port used to connect to the host.
            If 0 is used, then the host is a named pipe.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.RemotingParameters.CanTryToReconnectAfterConnectionLost">
            <summary>
            Gets or sets a value indicating if the client must be able to
            reconnect automatically after a connection lost. This in general
            is not used as the created objects will be lost.
            </summary>
        </member>
        <member name="P:Pfz.Remoting.RemotingParameters.Cryptography">
            <summary>
            Gets or sets the cryptography to be used.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingParameters.GettingStream">
            <summary>
            Event invoked when getting a new stream. You can change the stream
            at this moment for example to use SSL. But see the Cryptography
            property for an easy method of encryption.
            </summary>
        </member>
        <member name="E:Pfz.Remoting.RemotingParameters.Handshaking">
            <summary>
            Event invoked during initialization of the connection, telling
            if the server supports/requires/forbids cryptography and, if it
            supports, which ones could be used.
            </summary>
        </member>
    </members>
</doc>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Microsoft
United States United States
I started to program computers when I was 11 years old, as a hobbyist, programming in AMOS Basic and Blitz Basic for Amiga.
At 12 I had my first try with assembler, but it was too difficult at the time. Then, in the same year, I learned C and, after learning C, I was finally able to learn assembler (for Motorola 680x0).
Not sure, but probably between 12 and 13, I started to learn C++. I always programmed "in an object oriented way", but using function pointers instead of virtual methods.

At 15 I started to learn Pascal at school and to use Delphi. At 16 I started my first internship (using Delphi). At 18 I started to work professionally using C++ and since then I've developed my programming skills as a professional developer in C++ and C#, generally creating libraries that help other developers do their work easier, faster and with less errors.

Want more info or simply want to contact me?
Take a look at: http://paulozemek.azurewebsites.net/
Or e-mail me at: paulozemek@outlook.com

Codeproject MVP 2012, 2015 & 2016
Microsoft MVP 2013-2014 (in October 2014 I started working at Microsoft, so I can't be a Microsoft MVP anymore).

Comments and Discussions