示例#1
0
 public WebRemotingEndPoint(GrainIdGenerator idGenerator, string name, EndPointType type,
                            IAuthenticator clientAuthenticator,
                            IAuthenticator serverAuthenticator,
                            ICodeGenerator codeGenerator,
                            HeartbeatSettings heartbeatSettings,
                            LatencySettings latencySettings,
                            EndPointSettings endPointSettings)
     : base(
         idGenerator, name, type, clientAuthenticator, serverAuthenticator, codeGenerator, heartbeatSettings,
         latencySettings, endPointSettings)
 {
 }
		internal AbstractNamedPipeEndPoint(string name,
			EndPointType type,
			IAuthenticator clientAuthenticator,
			IAuthenticator serverAuthenticator,
			ICodeGenerator codeGenerator,
			HeartbeatSettings heartbeatSettings,
			LatencySettings latencySettings,
			EndPointSettings endPointSettings)
			: base(
				new GrainIdGenerator(type), name, type, clientAuthenticator, serverAuthenticator, codeGenerator,
				heartbeatSettings,
				latencySettings, endPointSettings)
		{
		}
 /// <summary>
 ///
 /// </summary>
 /// <param name="name"></param>
 /// <param name="clientAuthenticator"></param>
 /// <param name="serverAuthenticator"></param>
 /// <param name="codeGenerator"></param>
 /// <param name="heartbeatSettings"></param>
 /// <param name="latencySettings"></param>
 /// <param name="endPointSettings"></param>
 public NamedPipeRemotingEndPointServer(string name = null,
                                        IAuthenticator clientAuthenticator  = null,
                                        IAuthenticator serverAuthenticator  = null,
                                        ICodeGenerator codeGenerator        = null,
                                        HeartbeatSettings heartbeatSettings = null,
                                        LatencySettings latencySettings     = null,
                                        EndPointSettings endPointSettings   = null)
     : base(name, EndPointType.Server,
            clientAuthenticator,
            serverAuthenticator,
            codeGenerator,
            heartbeatSettings,
            latencySettings,
            endPointSettings)
 {
 }
示例#4
0
 /// <summary>
 ///     Creates a new socket end point that (optionally) is bound to the given
 ///     P2P name, if PNRP is available, otherwise the name is only used for debugging.
 /// </summary>
 /// <param name="type">The type of endpoint to create</param>
 /// <param name="name">
 ///     The name of this socket, used to publish it via PNRP as well as to refer to this endpoint in
 ///     diagnostic output
 /// </param>
 /// <param name="clientAuthenticator">
 ///     The authenticator, if any, to authenticate a client against a server (both need to
 ///     use the same authenticator)
 /// </param>
 /// <param name="serverAuthenticator">
 ///     The authenticator, if any, to authenticate a server against a client (both need to
 ///     use the same authenticator)
 /// </param>
 /// <param name="networkServiceDiscoverer">The discoverer used to find services by name within the local network</param>
 /// <param name="codeGenerator">The code generator to create proxy and servant types</param>
 /// <param name="heartbeatSettings">
 ///     The settings for heartbeat mechanism, if none are specified, then default settings are
 ///     used
 /// </param>
 /// <param name="latencySettings">
 ///     The settings for latency measurements, if none are specified, then default settings are
 ///     used
 /// </param>
 /// <param name="endPointSettings">The settings for the endpoint itself (max. number of concurrent calls, etc...)</param>
 public SocketEndPoint(EndPointType type,
                       string name = null,
                       IAuthenticator clientAuthenticator = null,
                       IAuthenticator serverAuthenticator = null,
                       INetworkServiceDiscoverer networkServiceDiscoverer = null,
                       ICodeGenerator codeGenerator        = null,
                       HeartbeatSettings heartbeatSettings = null,
                       LatencySettings latencySettings     = null,
                       EndPointSettings endPointSettings   = null)
     : base(new GrainIdGenerator(type),
            name,
            type,
            clientAuthenticator,
            serverAuthenticator,
            codeGenerator,
            heartbeatSettings,
            latencySettings,
            endPointSettings)
 {
     _networkServiceDiscoverer = networkServiceDiscoverer;
 }
示例#5
0
        /// <summary>
        /// </summary>
        /// <param name="name"></param>
        /// <param name="serverAuthenticator"></param>
        /// <param name="networkServiceDiscoverer"></param>
        /// <param name="clientAuthenticator"></param>
        /// <param name="codeGenerator"></param>
        /// <param name="heartbeatSettings"></param>
        /// <param name="latencySettings"></param>
        /// <param name="endPointSettings"></param>
        public SocketServer(string name = null,
                            IAuthenticator clientAuthenticator = null,
                            IAuthenticator serverAuthenticator = null,
                            INetworkServiceDiscoverer networkServiceDiscoverer = null,
                            ICodeGenerator codeGenerator        = null,
                            HeartbeatSettings heartbeatSettings = null,
                            LatencySettings latencySettings     = null,
                            EndPointSettings endPointSettings   = null)
        {
            _name = name ?? "<Unnamed>";
            _clientAuthenticator      = clientAuthenticator;
            _serverAuthenticator      = serverAuthenticator;
            _networkServiceDiscoverer = networkServiceDiscoverer;
            _codeGenerator            = codeGenerator ?? CodeGenerator.Default;
            _heartbeatSettings        = heartbeatSettings;
            _latencySettings          = latencySettings;
            _endPointSettings         = endPointSettings;

            _syncRoot           = new object();
            _subjects           = new Dictionary <ulong, ISubjectRegistration>();
            _internalEndPoints  = new HashSet <ISocketEndPoint>();
            _connectedEndPoints = new HashSet <ISocketEndPoint>();
        }