很多人在研究flash的socket中经常会出现一些问题,所以提供一个别人的程序代码出来给大家参考...

这是VS2003下的c#程序的主要源代码,经过测试的。不包含一些自动生成的代码。
这些代码是根据一个开源的C# socket程序改编的,而且已经写了比较详细的注释了。

C#源代码
Windows 应用的窗体程序:Form1.cs

C#+flash socket 聊天程序(转)using System;
C#+flash socket 聊天程序(转)
using System.IO;
C#+flash socket 聊天程序(转)
using System.Drawing;
C#+flash socket 聊天程序(转)
using System.Collections;//ArrayList引用到这个命名空间的类
C#+flash socket 聊天程序(转)
using System.ComponentModel;
C#+flash socket 聊天程序(转)
using System.Windows.Forms;
C#+flash socket 聊天程序(转)
using System.Data;
C#+flash socket 聊天程序(转)
using System.Net;
C#+flash socket 聊天程序(转)
using System.Net.Sockets;
C#+flash socket 聊天程序(转)
using System.Threading;
C#+flash socket 聊天程序(转)
C#+flash socket 聊天程序(转)
namespace ChatServer//服务器端命名空间


Class 类程序:Client.cs

C#+flash socket 聊天程序(转)using System;
C#+flash socket 聊天程序(转)
using System.Threading;
C#+flash socket 聊天程序(转)
C#+flash socket 聊天程序(转)
namespace ChatServer //定义命名空间
}


flash源代码
这是flash的代码,代码比较简单,没有写什么注释。
聊天.fla


来源:
http://www.roading.net/blog/article.asp?id=78
http://www.roading.net/blog/post_79.html

相关文章: