package com.example.chatapp

import java.io.InputStream
import java.io.OutputStream
import java.net.Socket
import java.util.Scanner

class SocketHandler(
    var ip: String,
    var port: Int,
) {
    lateinit var socket: Socket
    lateinit var writer: OutputStream
    lateinit var reader: Scanner

    fun connect() {
        this.socket = Socket(this.ip, this.port)
        this.writer = socket.getOutputStream()
        this.reader = Scanner(socket.getInputStream())
    }

}