- 07 1月, 2015 2 次提交
- 06 1月, 2015 4 次提交
- 04 1月, 2015 2 次提交
- 31 12月, 2014 4 次提交
- 30 12月, 2014 2 次提交
- 29 12月, 2014 2 次提交
- 22 12月, 2014 1 次提交
-
-
由 tanghai 提交于
增加TServer和TSession两个类,TSession提供send和recv应用层缓冲区,应用层会先将数据读写到缓冲区.通过时间回调来触发真正的系统读写事件.如果应用层有大量小包,这样合并发送性能会非常高.
-
- 18 12月, 2014 1 次提交
-
-
由 tanghai 提交于
2.TSocket发送接收以及回调都在poll线程处理.游戏逻辑也到poll线程执行. 3.压力测试1s可以收发15000个封包,对于游戏服务器应该足够了,用linux C++也不过40000个包左右
-
- 17 12月, 2014 2 次提交
- 12 12月, 2014 1 次提交
-
-
由 tanghai 提交于
-
- 17 11月, 2014 1 次提交
-
-
由 tanghai 提交于
2.整理一下代码
-
- 14 11月, 2014 3 次提交
- 12 11月, 2014 1 次提交
-
-
由 tanghai 提交于
2.回调不能使用delegate,delegate会导致无法reload.使用事件分发同的回调事件,比如BuffTimeout了会分发到BuffTimeoutCallback类中进行回调处理
-
- 10 11月, 2014 3 次提交
- 31 10月, 2014 2 次提交
- 30 10月, 2014 3 次提交
-
-
由 tanghai 提交于
-
由 tanghai 提交于
-
由 tanghai 提交于
2.本来想让Object支持集合初始化形式,例如 Object obj = new Object {{"a", 1}}. 这样需要继承IEnumerable,并且需要添加一个Add(string key, object value)方法,但是一旦实现IEnumerable接口,Mongdb会使用EnumerableSerializer序列化该类,导致异常. google到如下说明: https://jira.mongodb.org/browse/CSHARP-460 Here is a summary of the current situation: 1. Any class that subclasses a .NET collection class ends up being serialized using BsonClassMapSerializer, which doesn't work because the .NET collection class isn't designed the way BsonClassMapSerializer expects 2. As a result, the serialized document contains any public properties added by the derived class but does not contain the collection itself Item 2 is particularly surprising to people... The plan is to change the serialization of classes that implement collection interfaces to work better in more cases (but unfortunately not all). The new approach is essentially identical to that taken by the XmlSerializer in .NET. The new approach will be: 1. Any class that implements IDictionary<TKey, TValue> will be serialized using DictionarySerializer<TKey, TValue> 2. Any class that implements IDictionary will be serialized using DictionarySerializer 2. Any class that implements IEnumerable<T> will be serialized using EnumerableSerializer<T> 3. Any class that implements IEnumerable will be serialized using EnumerableSerializer Classes that implement IEnumerable<T> will also have to implement ICollection<T> if deserialization is desired (the Add method in ICollection<T> is needed for deserialization). Classes that implement IEnumerable will also have to implement IList if deserialization is desired (the Add method in IList is needed for deserialization). NOTE: just like with XmlSerializer, if your custom class implements either IEnumerable or IDictionary (legacy or generic) then ONLY the collection values will be serialized. If your custom class added additional public properties they will NOT be serialized. This is the opposite behavior as before, but is wrong less often (not serializing the collection values is always wrong, but custom collections that don't have additional properties are now serialized correctly). If you want to serialize your additional properties along with the collection values you will have to encapsulate and delegate to the collection class instead of subclassing it. Alex's suggestion to add a KeyValuePairSerializer<TKey, TValue> is a good one also. Work is in progress on this change.
-
- 29 10月, 2014 2 次提交
- 28 10月, 2014 1 次提交
-
-
由 tanghai 提交于
-
- 27 10月, 2014 2 次提交
- 21 10月, 2014 1 次提交
-
-
由 tanghai 提交于
-