static void Main(string[] args) { PackageExample package = new PackageExample(); tcp = new TcpConnection(package); tcp.OnReceive += OnReceive; tcp.OnConnecting += OnConnecting; // // }
void Connect() { var package = new PackageExample(); tcp = new TcpConnection(package); //tcp.OnConnecting+= //tcp.OnDisconnected+= tcp.OnConnected += OnConnected; tcp.OnReceiveMessage += OnReceive; tcp.Connect("127.0.0.1", 999); }