...
 
Commits (4)
......@@ -7,8 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### Added
* KSocket (`klib.net.socket.KSocket`)
* KString (`klib.text.KString`)
### Changed
* Moved and Renamed a lot of packages (Major Breaking Change)
### Deprecated
* kSock (`klib.net.socket.kSock`)
### Removed
### Fixed
### Security
......
......@@ -13,6 +13,7 @@ Breaking versions must be in a new row!
| 8 - 15| 0.2.0 - 1.4.0 |
|16 - 19| 2.0.0 - 2.1.1 |
|20 - 22| 3.0.0 - 3.2.0 |
|23 | 4.0.0 |
This means: `0.1.2` **IS** compatible with `0.1.3` but **NOT** compatible with `0.1.0` and `0.1.1`.
......@@ -25,7 +26,7 @@ As long as you dont use features of new versions and then go to a older version,
## Breaking Changes
Table created from APIs removed.
Table created from APIs removed/changed.
| Version | Change | Reason |
|---------|--------|--------|
......@@ -39,6 +40,7 @@ Table created from APIs removed.
| 3.0.0 | Removal of `kLibInf.versionId` | Replaced with `kLibInf.semver` using `types.SemVer` |
| 3.0.0 | Removal of `kLibRequire` | Replaced with `kLibRequire` using `types.SemVer` |
| 3.0.0 | Removal of `kLibRequire` (min,max) | Replaced with `kLibRequire` (min,max) using `types.SemVer` |
| 4.0.0 | Major renaming of packages | Following the suggestion from #1 |
## Upcoming Breaking Changes
......@@ -46,6 +48,7 @@ Table created from APIs marked as Deprecated.
| Since | Change | Reason |
|-------|--------|--------|
| 4.0.0 | Removal of kSock (`klib.net.socket.kSock`) API | Was replaced with KSocket (`klib.net.socket.KSocket`) |
## Experimental APIs
......
package klib.functions
import klib.KString
import klib.text.KString
fun kstring(builder: KString.() -> Unit): String {
return KString().apply(builder).toString()
......
package klib.net.socket
import klib.extensions.reset
import java.io.File
import java.nio.CharBuffer
import java.util.Timer
......@@ -29,7 +28,7 @@ class KSocket {
}
fun read(): Int {
if(!isReadable()) {
if (!isReadable()) {
data.clear()
return -1
}
......
......@@ -11,6 +11,8 @@ import java.util.TimerTask
* Simple but useful one-way IPC socket
*
* @since 3.0.0
* @since 4.0.0 (Deprecated)
* @deprecated
* @author Thomas Obernosterer
*/
@Deprecated("kSock has been replaced by KSocket", ReplaceWith("KSocket", "klib.net.socket.KSocket"), DeprecationLevel.ERROR)
......
package klib
package klib.text
class KString {
private val stringBuilder = StringBuilder()
......
package devtests
import klib.net.socket.kSock
fun main() {
kSock.open {
println(it.readText().trim())
}
}
\ No newline at end of file