Exemple #1
0
        public WCFTcpServerForm()
        {
            InitializeComponent();

            MainForm = this;

            OpenServiceConfiguration();
        }
Exemple #2
0
        //접속
        //클라이언트들이 접속되자 마자 실행하게될 메소드
        //접속한 클라이언트 정보를 받아 클라이언트 배열에 넣는다.&#
        public void StartService()
        {
            OperationContext      ctx    = OperationContext.Current;
            IWCFTcpClientCallback client = ctx.GetCallbackChannel <IWCFTcpClientCallback>();

            Common.clients.Add(client);

            //클라이언트 들은 IClientChannel로 타입캐스팅을 하여
            //각종 정보를 얻는다
            IClientChannel channel = client as IClientChannel;

            WCFTcpServerForm.AddClient(channel);

            WCFTcpServerForm.StartTimer();
        }