https://github.com/fredrickb/kotlin-network-cli-poc
Simple proof of concept for testing kscript and coroutines.
https://github.com/fredrickb/kotlin-network-cli-poc
kotlin kotlin-coroutines kscript
Last synced: 12 days ago
JSON representation
Simple proof of concept for testing kscript and coroutines.
- Host: GitHub
- URL: https://github.com/fredrickb/kotlin-network-cli-poc
- Owner: FredrickB
- Created: 2020-08-15T19:30:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-06T13:16:47.000Z (over 5 years ago)
- Last Synced: 2025-01-20T21:38:12.682Z (12 months ago)
- Topics: kotlin, kotlin-coroutines, kscript
- Language: Kotlin
- Homepage: https://fredrickb.com/2020/09/06/scripting-in-kotlin-with-kscript/
- Size: 76.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# kotlin network cli proof of concept
This is a simple proof of concept for testing [kscript](https://github.com/holgerbrandl/kscript) and coroutines.
Simply finds all network interfaces on the host and attempts to ping each host on subnet with range /24.
_The networking portion of the code is a best-case effort due to the underlying implementation of the networking libraries. It works ok enough for a proof of concept, but don't use it for anything serious._
## Development
### Setup environment
Assuming you already have [sdkman](https://sdkman.io/) installed:
1. `sdk install kotlin`
1. `sdk install kscript`
### Running the project
`kscript App.kts`
### Setting up IDEA
`kscript --idea App.kts`
#### Annotation support
Including screenshot since I had some troubles with this initially.
"kscript-annotations" on the bottom is what is necessary, the rest are added within the script files themselves or by kscript.
