易截截图软件、单文件、免安装、纯绿色、仅160KB

flash C# Socket

2009-09-01 17:33在.net中定义以下
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
namespace ClientSocket
{
public class AsynchronousSocketListener
{
    //异步socket诊听
    // Incoming data from client.从客户端传来的数据
    public static string data = null;
    // Thread signal.线程 用一个指示是否将初始状态设置为终止的布尔值初始化 ManualResetEvent 类的新实例。
    public static ManualResetEvent allDone = new ManualResetEvent(false);
    public AsynchronousSocketListener()
    {
    }
    public static void StartListening()
    {
     // Data buffer for incoming data. 传入数据缓冲
     byte[] bytes = new Byte[1024];
     // Establish the local endpoint for the socket. 建立本地端口
     // The DNS name of the computer
     // running the listener is "host.contoso.com".
     IPHostEntry ipHostInfo = Dns.Resolve(Dns.GetHostName());
     IPAddress ipAddress = ipHostInfo.AddressList[0];
  
     IPEndPoint localEndPoint = new IPEndPoint(ipAddress, 11001);
     // Create a TCP/IP socket.
     Socket listener = new Socket(AddressFamily.InterNetwork,
      SocketType.Stream, ProtocolType.Tcp );
     // Bind the socket to the local endpoint and listen for incoming connections.绑定端口和数据
     try
     {
      listener.Bind(localEndPoint);
      listener.Listen(100);
      while (true)
      {
       // Set the ev


相关文档:

asp.net(c#)数据类型格式转换大全

1、DateTime   数字型 
       System.DateTime currentTime=new System.DateTime(); 
  1.1 取当前年月日时分秒 
       currentTime=System.DateTime.Now; 
  1.2 取当前年 
   &nb ......

FLASH制作软件合集

一、常用制作软件
1、Macromedia Flash v8.0 简体版   
 
软软件大小:123.96MB
 
序列号:WPD800-51931-56332-97731
  WPD800-52630-88732-94085
  WPD800-53537-77832-85167
  WPD800-56030-83832-97910
下载地址: http://www.crsky.com/soft/5699.html
 
2 ......

Flash使用服务器时间

在做Flash应用时,有时可能会遇到需要使用服务器时间的情况,例如应用程序中显示当前系统时间、定时提醒等功能。使用new Date()创建的是客户端的时间,这并不是我们需要的,客户端时间很容易被用户更改,我们需要统一的服务器时间。
使用Flash与后台通信,我想您应该已经应用到您的项目中,不管使用哪种方式,都可以把服务 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号