How can i use sockets?

In my project i need to get data from a server how can i import socket into kotlin script?
and other question why there is no a website that explain about the language,if there is one i really would like to get a link.

thanks:)

https://kotlinlang.org/docs/reference/

It really depends on what you want to achieve.
Typically with Android most users want a JSON over HTTP connection, but if you want rare sockets you can simply import the appropriate Java classes from the java.net package.
See here What Is a Socket? (The Java™ Tutorials > Custom Networking > All About Sockets)
Or here Socket  |  Android Developers

Answers like this you will more easily find on stack overflow, as this is not a “how to Java” or “how to Android” forum.

Check this simple basic…socket programming

i got this working socket programing i think this will help you to cerate sockets in kotlin

sever.kt

client.kt