新增TCP扩展
This commit is contained in:
1 parent
514d6f5255
commit
f119665d29
26 files changed
+2457
-34
No files matched your search
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public sealed class SocketAsyncEventArgsWithId : IDisposable
|
||||
{
|
||||
private string uid = "-1";
|
||||
private bool state = false;
|
||||
private bool isAllowReceive = true;
|
||||
private MySocketAsyncEventArgs receiveSaea;
|
||||
private MySocketAsyncEventArgs sendSaea;
|
||||
|
||||
public SocketAsyncEventArgsWithId()
|
||||
{
|
||||
this.receiveSaea = new MySocketAsyncEventArgs("Receive");
|
||||
this.sendSaea = new MySocketAsyncEventArgs("Send");
|
||||
}
|
||||
|
||||
public string UID
|
||||
{
|
||||
get { return uid; }
|
||||
set
|
||||
{
|
||||
uid = value;
|
||||
receiveSaea.UID = value;
|
||||
sendSaea.UID = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool State
|
||||
{
|
||||
get { return this.state; }
|
||||
set { this.state = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否允许接收
|
||||
/// </summary>
|
||||
public bool IsAllowReceive
|
||||
{
|
||||
get { return this.isAllowReceive; }
|
||||
set { this.isAllowReceive = value; }
|
||||
}
|
||||
|
||||
public MySocketAsyncEventArgs ReceiveSAEA
|
||||
{
|
||||
get { return this.receiveSaea; }
|
||||
set { this.receiveSaea = value; }
|
||||
}
|
||||
|
||||
public MySocketAsyncEventArgs SendSAEA
|
||||
{
|
||||
get { return this.sendSaea; }
|
||||
set { this.sendSaea = value; }
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
this.receiveSaea.Dispose();
|
||||
this.sendSaea.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user