Add minimal HTTP server and shared network type packages

This commit is contained in:
sergeych committed 2026-04-26 10:09:25 +03:00
1 parent 79b015ee56
commit 01ceecd7df
28 files changed
+2642 -55

No files matched your search

+1 -25
View File
@@ -1,30 +1,6 @@
package lyng.io.net
/* Address family for resolved or bound endpoints. */
enum IpVersion {
IPV4,
IPV6
}
/* Concrete socket endpoint. */
extern class SocketAddress {
/* Numeric or host-form address string. */
val host: String
/* Transport port number. */
val port: Int
/* Address family. */
val ipVersion: IpVersion
/* True when obtained from DNS resolution rather than raw bind input. */
val resolved: Bool
/* Stable printable form such as `127.0.0.1:4040` or `[::1]:4040`. */
override fun toString(): String
}
/* Datagram payload paired with sender/peer address. */
extern class Datagram {
val data: Buffer
val address: SocketAddress
}
import lyng.io.net.types
/* Connected TCP socket. */
extern class TcpSocket {