package com.mogo.cloud;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.mogo.cloud.netty.client.NettyClientActivity;
import com.mogo.cloud.netty.server.NettyServerActivity;

public class NSDNettyActivity extends AppCompatActivity {

    private Button btnNettyServer;
    private Button btnNettyClient;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_nsdnetty);
        initView();
    }

    private void initView() {
        btnNettyServer = findViewById(R.id.btnNettyServer);
        btnNettyServer.setOnClickListener(v -> {
            Intent intent = new Intent(NSDNettyActivity.this, NettyServerActivity.class);
            startActivity(intent);
        });
        btnNettyClient = findViewById(R.id.btnNettyClient);
        btnNettyClient.setOnClickListener(v -> {
            Intent intent = new Intent(NSDNettyActivity.this, NettyClientActivity.class);
            startActivity(intent);
        });
    }
}