易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

Flash Player帧频、Timer计时 的时间间隔

对于大部分Flash开发者,都已经知道Flash的帧频、Timer计时并不是十分精确的。如果您已经做过这方面测试,可以略过这篇文章的前面一部分,在后面有关于Flash Player可变跑道的文章链接,希望对您有帮助。这篇文章的主要目的是让一些不知道Flash计时不精确和知道但又没有做过测试的朋友,来分享我的测试结果。我使用的Flex开 ......

Flash开发者需要知道的10件事

近日John Lindquist谈到了在为Roundarch公司招聘Flash/Flex开发人员时的一些感受。他认为最难的地方在于问什么问题才能最好地了解到应聘者的Flash/Flex开发技能。因此,他给出了一个列表并说到:“根据我的经验,通过这个列表能更好地判断面试者的技术水平和经验”。
本文就将概要地介绍Flash开发者需要知道的10 ......

flash 更改鼠标样式

首先说明在Flash里改变鼠标样式,并不是在flash里导入静态鼠标文件或者是动态鼠标文件,而是自动隐藏鼠标,自动拖动一个MC来实现改变鼠标样式。首先新建一个影片,新建一个MC,进入MC的编辑状态,绘制一个你喜欢的鼠标样式,因为是在MC里面,你可以做一个动态鼠标,也可以做一个静态鼠标。(注意:一定要把你制作的鼠标的中 ......

浮动广告被页面上的flash遮挡的解决方法

<div class="ad2">
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
            widt ......

C#连接Access和SQL Server数据库

C#连接连接Access
首先看一个例子代码片断:
程序代码:
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=C:\BegASPNET\Northwin ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号