C#.net同步异步SOCKET通讯和多线程总结(13)
return ;
}
}
//发送
private void button2_Click(object sender, System.EventArgs e)
{
if (textBox2.Text !="")
{
swWriter.WriteLine(textBox2.Text);//刷新当前数据流中的数据
swWriter.Flush();
}
else
{
MessageBox.Show("发送信息不能为空!","错误提示!");
}
}
// 清理所有正在使用的资源。
protected override void Dispose( bool disposing )
{
if ( tcpConnect )
{
swWriter.WriteLine ( "STOP" ) ; //发送控制码
swWriter.Flush (); //刷新当前数据流中的数据
nsStream.Close (); //清除资源
swWriter.Close ();
}
if( disposing )
{
if (components != null)
相关新闻>>
- 发表评论
-
- 最新评论 更多>>
今日头条
更多>>您可能感兴趣的文章
- ASP.NET MVC 与 WebForm 三层架构 区
- 关于ASP.NET网站部署 --- "aspnet_client"文
- 最简单的Web服务器事例分析
- asp.net Execl的添加,更新操作实现代码
- 在ASP.net 中从sqlserver检索(retrieve)图片
- ADO.NET的记忆碎片(四)
- 利用C++Builder 开发Web Service应用——基于Web Service技术的
- 在ASP.NET环境下解决类文件的智能提示问题
- asp.net 使用System.Net.Mail 发送邮件的实现代码
- MVC3+Entity Framework 实现投票系统(一)