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中场景切换的几个方法在制作flash动画的时候,可能会有有很的mc
有时会把它放到几个场景中,那么在场景中的跳转如何实现呢?
请看教程吧。
1.
方法一:(使用telltarg...
方法一:(使用telltarget命令)
按钮上的as为:
on (release) {
tellTarget ("/") {& ......
C#连接连接Access
首先看一个例子代码片断:
程序代码:
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=C:\BegASPNET\Northwin ......
在做Flash应用时,有时可能会遇到需要使用服务器时间的情况,例如应用程序中显示当前系统时间、定时提醒等功能。使用new Date()创建的是客户端的时间,这并不是我们需要的,客户端时间很容易被用户更改,我们需要统一的服务器时间。
使用Flash与后台通信,我想您应该已经应用到您的项目中,不管使用哪种方式,都可以把服务 ......