package com.grkj.iscs.view.activity.test

import com.grkj.iscs.view.base.BaseActivity
import com.grkj.iscs.databinding.ActivityWebSocketBinding
import com.grkj.iscs.util.StompApi
import com.grkj.iscs.util.log.LogUtil

class WebSocketActivity : BaseActivity<ActivityWebSocketBinding>() {

    override val viewBinding: ActivityWebSocketBinding
        get() = ActivityWebSocketBinding.inflate(layoutInflater)

    override fun initView() {
        StompApi.refuseStomp(this) { stomp, destination ->
            stomp.topic(destination) {

            }
        }

        mBinding?.page?.setTotalPage(10)
        mBinding?.page?.initPageComposite()
        mBinding?.page?.setPageChangeListener { pageControl, numPerPage ->
            LogUtil.i("pageControl: $pageControl, numPerPage: $numPerPage")
        }
    }
}