Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        public void Bind(string ip, int port, Binding binding, Action <string, byte[]> receivedCallback)
        {
            _ip      = ip;
            _port    = port;
            _binding = binding;
            Uri uri = new Uri(string.Format("net.tcp://{0}:{1}/WcfService", _ip, _port));

            _address                    = new EndpointAddress(uri);
            _callbackHandle             = new WcfCallback();
            _callbackHandle.OnReceived += receivedCallback;
            _callbackHandle.OnClosed   += OnWcfClose;
            ResetChannel();
        }
Exemple #2
0
 /// <summary>
 /// 
 /// </summary>
 public void Bind(string ip, int port, Binding binding, Action<string, byte[]> receivedCallback)
 {
     _ip = ip;
     _port = port;
     _binding = binding;
     Uri uri = new Uri(string.Format("net.tcp://{0}:{1}/WcfService", _ip, _port));
     _address = new EndpointAddress(uri);
     _callbackHandle = new WcfCallback();
     _callbackHandle.OnReceived += receivedCallback;
     _callbackHandle.OnClosed += OnWcfClose;
     ResetChannel();
 }