1 /// 2 /// 从 TCP 网络客户端侦听连接。 3 /// 4 public class TcpServer 5 { 6 private bool isClosing = false; // 服务器 closing 标志位 7 private TcpListener server... Read More
posted @ 2019-08-07 17:19 baiqjh Views(1138) Comments(0) Diggs(0) Edit
1 /// 2 /// Redis读写帮助类 3 /// 4 public class RedisHelper 5 { 6 private ConnectionMultiplexer redis { get; set; } 7 private IDatabase db { get; set... Read More
posted @ 2019-08-07 17:14 baiqjh Views(265) Comments(0) Diggs(0) Edit
string appconfig = System.IO.Path.Combine(context.Bundle.Location, "bin", context.Bundle.Name + ".dll.config"); ExeConfigurationFileMap map = new ExeConfigurationFileMap(); ... Read More
posted @ 2016-03-18 14:45 baiqjh Views(245) Comments(0) Diggs(0) Edit
// --------------------------------------------------------------------------------------------------------------------// // Copyright (c) TouTou Ow... Read More
posted @ 2016-01-14 09:12 baiqjh Views(255) Comments(0) Diggs(0) Edit
考 虑到UDP的无状态特性,目前针对其的NAT实现大致可分为Full Cone、Restricted Cone、Port Restricted Cone和Symmetric NAT四种。值得指出的是,对于TCP协议而言,一般来说,目前NAT中针对TCP的实现基本上是一致的,其间并不存在太大差异,这是... Read More
posted @ 2016-01-11 14:49 baiqjh Views(524) Comments(0) Diggs(0) Edit
_(下划线)If you enter an expression, the resulting value will be printed to the console. The result of the last expression, whether value orobject, is av... Read More
posted @ 2015-02-05 12:53 baiqjh Views(223) Comments(0) Diggs(0) Edit
internal class LocalTimeHelper { [StructLayout(LayoutKind.Sequential)] struct SystemTime { public UInt16 Year; ... Read More
posted @ 2015-01-23 17:15 baiqjh Views(202) Comments(0) Diggs(0) Edit
posted @ 2014-07-30 11:43 baiqjh Views(370) Comments(0) Diggs(0) Edit
封装好的帮助类,实现玻璃效果。using System;using System.Collections.Generic;using System.Linq;using System.Runtime.InteropServices;using System.Text;using System.Win... Read More
posted @ 2014-07-29 22:30 baiqjh Views(162) Comments(0) Diggs(0) Edit
//方法一:string version = System.Reflection.Assembly.LoadFrom(strFilePath).GetName().Version.ToString();//方法二:Version ApplicationVersion = new Version(Ap... Read More
posted @ 2014-07-15 11:19 baiqjh Views(144) Comments(0) Diggs(0) Edit