- connector
- XXXconnection
- XXXchannel or upstram-pipeline for accept/receive
- XXXtransport or downstream-pipeline for send
- handler
- io buffer
- codedec
- server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
// easy timer task, support delay and reset | |
public class ResetableTimer { | |
private boolean running; | |
private Thread boss; | |
private ExecutorService threadPool; | |
private Runnable task; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//c# byte 0-255 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tcpdump -i eth0 src 10.13.3.3 and port 7001 | |
tcpdump -i eth0 dst 10.13.3.3 and port 7001 | |
tcpdump -i eth0 -A -nn dst 10.13.3.3 and port 7001 | |
tcpdump -i eth0 -w dump.pcap dst 10.13.3.3 and port 7001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Threading; | |
namespace TopPushClientTest | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary>log write to console | |
/// </summary> | |
public class DefaultLogger : ILog | |
{ | |
public string Name { get; private set; } | |
public bool IsDebugEnabled { get; private set; } | |
public bool IsInfoEnabled { get; private set; } | |
public bool IsWarnEnabled { get; private set; } | |
public bool IsErrorEnabled { get; private set; } | |
public bool IsFatalEnabled { get; private set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://code.google.com/p/weguan/source/browse/web/juzhai/trunk/src/main/resources/properties/redis.properties?r=59 | |
redis.host=192.168.1.10 | |
redis.port=6379 | |
redis.database=1 | |
redis.timeout=120000 | |
redis.use.pool=true | |
#池中可借的最大数 | |
redis.maxActive=50 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
namespace SdkDemo | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
download jdk6/7/8 first | |
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | |
#windows | |
JAVA_HOME=C:\java_tools\jdk1.6.0 | |
CLASSPATH=.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar |