socket

moon add tonyfettes/socket@0.1.2
Download zip
Version
0.1.2
License
Apache-2.0
Last updated
11 months ago
Downloads
23
README

#
ToSockaddr

pub(open) trait ToSockaddr {
to_sockaddr(self : Self) -> Sockaddr
of_sockaddr(sockaddr : Sockaddr) -> Self?
}

#
Sockaddr

pub(all) type Sockaddr Bytes

#
Sockaddr::family

fn Sockaddr::family(self : Sockaddr) -> Int

#
Sockaddr::inner

fn Sockaddr::inner(self : Sockaddr) -> Bytes
Convert newtype to its underlying type, automatically derived.

#
Sockaddr::new

fn Sockaddr::new() -> Sockaddr

#
Sockaddr::to

fn[T : ToSockaddr] Sockaddr::to(self : Sockaddr) -> T?

#
Socket

pub(all) type Socket UInt64

#
Socket::connect

fn[T : ToSockaddr] Socket::connect(self : Socket, addr : T) -> Bool

#
Socket::inner

fn Socket::inner(self : Socket) -> UInt64
Convert newtype to its underlying type, automatically derived.

#
Type

pub(all) enum Type {
STREAM
DGRAM
RAW
RDM
SEQPACKET
}

#
Type::of_int

fn Type::of_int(i : Int) -> Type?

#
Type::to_int

fn Type::to_int(self : Type) -> Int

#
socket

fn socket(domain : Int, type_ : Type, protocol : Int) -> Socket

Source Files

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io