<https://github.com/OtakuSenpai/Ktor_TestBot> Can ...
# ktor
o
https://github.com/OtakuSenpai/Ktor_TestBot Can someone help me with this program? Getting errors whatever I try
Copy code
This is a demo of Raw Sockets using Ktor.
In this demo we connect to any IRC server using both SSL and PLAIN connection.
This is a demo only, feel free to use the code as you wish.
Made by Avra Neel aka OtakuSenpai, under public domain!!

Enter the address: 
<http://chat.freenode.net|chat.freenode.net>
Enter connection mechanism:
1) Plain = plain
2) Ssl = ssl
plain
Connecting....
Sending: NICK KtorBot

Sending: USER KtorBot 0 * :KtorBot

Connected!
Entering loop...
Received data: :<http://livingstone.freenode.net|livingstone.freenode.net> NOTICE * :*** Looking up your hostname...
Received data: :<http://livingstone.freenode.net|livingstone.freenode.net> NOTICE * :*** Checking Ident
Received data: :<http://livingstone.freenode.net|livingstone.freenode.net> NOTICE * :*** Couldn't look up your hostname
Received data: :<http://livingstone.freenode.net|livingstone.freenode.net> NOTICE * :*** No Ident response
Received data: ERROR :Closing Link: 127.0.0.1 (Connection timed out)
java.lang.Exception: BasicConnection.kt: Didn't receive data from connection!
	at com.github.otakusenpai.testbot.connection.BasicConnection$receiveUTF8Data$1.doResume(BasicConnection.kt:105)
	at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:42)
	at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:41)
	at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:41)
	at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:41)
	at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:41)
	at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:41)
	at kotlinx.coroutines.experimental.DispatchedTask$DefaultImpls.run(Dispatched.kt:149)
	at kotlinx.coroutines.experimental.io.internal.MutableDelegateContinuation.run(MutableDelegateContinuation.kt:14)
	at kotlinx.coroutines.experimental.EventLoopBase.processNextEvent(EventLoop.kt:140)
	at kotlinx.coroutines.experimental.BlockingCoroutine.joinBlocking(Builders.kt:70)
	at kotlinx.coroutines.experimental.BuildersKt__BuildersKt.runBlocking(Builders.kt:46)
	at kotlinx.coroutines.experimental.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.experimental.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
	at kotlinx.coroutines.experimental.BuildersKt.runBlocking$default(Unknown Source)
	at com.github.otakusenpai.testbot.connection.BasicConnection.receiveUTF8Data(BasicConnection.kt:99)
	at com.github.otakusenpai.testbot.MainKt$main$1$job$1.doResume(main.kt:86)
	at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:42)
	at kotlinx.coroutines.experimental.DispatchedTask$DefaultImpls.run(Dispatched.kt:149)
	at kotlinx.coroutines.experimental.DispatchedContinuation.run(Dispatched.kt:13)
	at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Copy code
java.lang.Exception: BasicBot.kt: Null value received from connection!
	at com.github.otakusenpai.testbot.MainKt$main$1.doResume(main.kt:90)
	at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:42)
	at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:41)
	at kotlinx.coroutines.experimental.DispatchedTask$DefaultImpls.run(Dispatched.kt:149)
	at kotlinx.coroutines.experimental.AbstractContinuation.run(AbstractContinuation.kt:19)
	at kotlinx.coroutines.experimental.EventLoopBase.processNextEvent(EventLoop.kt:140)
	at kotlinx.coroutines.experimental.BlockingCoroutine.joinBlocking(Builders.kt:70)
	at kotlinx.coroutines.experimental.BuildersKt__BuildersKt.runBlocking(Builders.kt:46)
	at kotlinx.coroutines.experimental.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.experimental.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
	at kotlinx.coroutines.experimental.BuildersKt.runBlocking$default(Unknown Source)
	at com.github.otakusenpai.testbot.MainKt.main(main.kt:46)
Received data: null

Process finished with exit code 0
@Deactivated User hey can you take a look please ?
d
Yes
o
Can anyone please help me investigate this errors? Always getting connection timeouts. @Deactivated User ?
d
are related to the ssl we have been talking? or happens on a non-secure socket?