FastSocket.SocketBase socket connection collection key:ConnectionID add connection is null remove connection by id. get by connection id to array count. 断开所有连接 connection disconnected delegate console trace listener debug error info diagnostic listener debug error info trace listener interface. debug error info trace enable console trace listener enable diagnostic add listener listener is null debug message is null info message is null error message is null trace listener wrapper new debug error info 消息处理handler message received eventArgs process callback Buffer new processCallback is null 设置已读取长度 packet get or set sent size. get the packet created time get payload new payload is null. get or set tag object 获取一个值,该值指示当前packet是否已发送完毕. true表示已发送完毕 a connection interface. disconnected event return the connection is active. get the connection latest active time. get the connection id. 获取本地IP地址 获取远程IP地址 获取或设置与用户数据 异步发送数据 异步接收数据 异步断开连接 socket connection host interface get socket buffer size get message buffer size create new get by connectionID list all get connection count. 启动 停止 base host new socketBufferSize messageBufferSize get socket buffer size get message buffer size create new socket is null get by connectionID list all get connection count. 启动 停止 生成下一个连接ID register connection connection is null OnConnected OnStartSending OnSendCallback OnMessageReceived OnDisconnected connection is null OnError pool new acquire release default socket connection new socket is null host is null 连接断开事件 return the connection is active. get the connection latest active time. get the connection id. 获取本地IP地址 获取远程IP地址 获取或设置与用户数据 异步发送数据 异步接收数据 异步断开连接 free send queue free for send. free fo receive. fire StartSending fire SendCallback fire MessageReceived fire Disconnected fire Error internal send packet. packet is null internal send packet. async send callback receive async receive callback message process callback readlength less than 0 or greater than payload.Count. disconnect async disconnect callback packet queue new sendAction is null. try send packet if CLOSED return false. close try send next packet if CLOSED return false. close queue result before close state wait sending packet array new 一致性哈希container new source is null Given an item key hash, this method returns the Server which is closest on the server key continuum. get Fowler-Noll-Vo hash, variant 1, 32-bit version. http://www.isthe.com/chongo/tech/comp/fnv/ hash new init hashcore hash final Modified Fowler-Noll-Vo hash, 32-bit version. http://home.comcast.net/~bretm/hash/6.html hashFinal. 关于时间的一些操作 unix下的纪元时间 the max milliseconds since epoch. Gets the current utc time in an optimized fashion. Converts a DateTime to UTC (with special handling for MinValue and MaxValue). A DateTime. The DateTime in UTC. Converts a DateTime to number of milliseconds since Unix epoch. A DateTime. Number of seconds since Unix epoch. Converts a DateTime to number of seconds since Unix epoch. A DateTime. Number of seconds since Unix epoch. Converts from number of milliseconds since Unix epoch to DateTime. The number of milliseconds since Unix epoch. A DateTime. Converts from number of seconds since Unix epoch to DateTime. The number of seconds since Unix epoch. A DateTime. Converts a DateTime to local time (with special handling for MinValue and MaxValue). A DateTime. A DateTimeKind. The DateTime in local time. SpecifyKind ip utility A类: 10.0.0.0-10.255.255.255 A类: 10.0.0.0-10.255.255.255 B类: 172.16.0.0-172.31.255.255 B类: 172.16.0.0-172.31.255.255 C类: 192.168.0.0-192.168.255.255 C类: 192.168.0.0-192.168.255.255 static new ipaddress convert to long ipaddress convert to long true表示为内网IP true表示为内网IP true表示为内网IP 获取本机内网IP 获取本机内网IP列表 network bit converter. 以网络字节数组的形式返回指定的 16 位有符号整数值。 以网络字节数组的形式返回指定的 32 位有符号整数值。 以网络字节数组的形式返回指定的 64 位有符号整数值。 返回由网络字节数组中指定位置的两个字节转换来的 16 位有符号整数。 返回由网络字节数组中指定位置的四个字节转换来的 32 位有符号整数。 返回由网络字节数组中指定位置的八个字节转换来的 64 位有符号整数。 反射帮助类。 获取实现了指定类口类型的基类实例。 接口类型 指定的程序集 assembly is null task ex delay