title: Create a TCP Listener in Kotlin
body: <p>I'm currently giving Kotlin a whirl for a project I am working on. This project requires me to open a Socket and listen for TCP Packets on a port, so that I can later parse them. In Java, the following works if the variables referenced are defined, using a buffer reader, a socket and a server socket:</p>
  
  <pre><code>while((CurrentLine = ClientBufferReader.readLine()) != null){FullString += CurrentLine}
  </code></pre>
  
  <p>However, in Kotlin, this does not work, as it is not possible to evaluate an assignment. How could I go about retrieving the same result in Kotlin?</p>