title: Kotlin Client send and receive image from Linux python3 socket Server
body: <p>I'm trying to send and receive Image with Socket connect
  However, the string between the client and the server can be exchanged, but it does not proceed from exchanging images.</p>
  <p>This is My Kotlin Client code</p>
  <pre><code>class MainActivity : AppCompatActivity() {
  lateinit var binding: ActivityMainBinding
  
  
  override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
      binding = ActivityMainBinding.inflate(layoutInflater)
      setContentView(binding.root)
  
      Client().start()
  
  }
  
  
  
  class Client : Thread()
  {
      var readImage = ReadImage()
      override fun run(){
          try{
              var socket = Socket(&quot;35.216.104.58&quot;,3000)
              var input = socket.getInputStream()
              var dis = DataInputStream(input)
  
              var output = socket.getOutputStream()
              var dos = DataOutputStream(output)
              var data  = getImageByte(readImage.setImage(0))
              dos.write(data)
  
              dos.close()
              output.close()
              socket.close()
  
  
  
          }catch (e: Exception){
              e.printStackTrace()
          }
  
  
      }
  
    }
  }
  </code></pre>
  <p>and this is My Python3 Code</p>
  <pre><code>import socket
  import cv2
  
  ip = ''
  port = 3000
  
  server_socket = socket.socket(socket.AF_INET)
  server_socket.bind((ip,port))
  server_socket.listen(1)
  
  print('Waiting Client...')
  
  client_socket, addr = server_socket.accept()
  print('Connet Client!!')
  
  data = client_socket.recv(1024)
  encoded_img = np.fromstring(data,dtype = np.uint8)
  image = cv2.imdecode(encoded_img,cv2.IMREAD_COLOR)
  </code></pre>
  <p>How can I send and receive images between clients and servers?</p>