protected Connection(string channelName, GateEvents events) { channel_name = channelName; Events = events; _callbackSend = new AsyncCallback(sendCallback); _callbackReceive = new AsyncCallback(receiveCallback); sequence_number = 1; connected = false; // Make bidirectional by default direction_in = true; direction_out = true; enquire_link_timer = new System.Timers.Timer(); enquire_link_timer.Interval = keep_alive; enquire_link_timer.Elapsed += new ElapsedEventHandler(enquire_link_timer_Elapsed); timeout_timer = new System.Timers.Timer(); timeout_timer.Interval = timeout; timeout_timer.Elapsed += new ElapsedEventHandler(timeout_timer_Elapsed); commands_queue = new SortedList <uint, DateTime>(); submitted_messages = new SortedList <uint, submitted_message>(); multipart_messages = new List <Common.MultipartMessage>(); multipart_sequence_number = 1; last_pdu_time = DateTime.Now.AddHours(-1); }
/// <summary> /// Initializes new object for Client connection /// </summary> /// <param name="channelName">Unique channel name</param> /// <param name="events">Events object</param> public Client(string channelName, GateEvents events) : base(channelName, events) { if (Gate.Clients.ContainsKey(channelName)) { throw new ArgumentException("Channel with the same name already registered"); } Gate.Clients.Add(channelName, this); }
/// <summary> /// Initializes Gate /// </summary> public Gate(GateEvents events) { //Common.InitCommandID(); //Common.InitCommandStatus(); //Common.InitTLV(); //Common.InitBodyFormat(); Events = events; }
public DeliverSm(GateEvents events) { gateEvents = events; }