标题:c#不用Accept()方法如何接收数据
只看楼主
wang2827387
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2013-4-8
结帖率:0
 问题点数:0 回复次数:0 
c#不用Accept()方法如何接收数据
//监听方法
        private void ListeningRequest()
        {
            while (true)
            {
                Socket tempSocket = socket_listen_request.Accept();
                byte[] buff = new byte[1024];
                int receiveLength = tempSocket.Receive(buff);
                string msgStr = Encoding.Default.GetString(buff, 0, receiveLength);

                this.txt_sendInfo.Text += msgStr;
            }
        }
搜索更多相关主题的帖子: private Socket 如何 
2013-04-09 09:59



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-403430-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015729 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved