Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

channel

net.channel

a channel encapsulates an open network resource
that can be read from and written to.
channels are usually installed by a successfully connected client
or a by a newly accepted server connection.

Note that even though UDP is a connection-less protocol its
usage in fuzion does not differ from TCP except for the following
caveats.
1) Reading a Datagram with a buffer not large enough to hold
all data will lead to the rest of the datagram being dropped.
2) writing to a channel installed by `server.accept` will result in an error.
3) reading from a channel installed by `client ...` will block indefinitely.

Constructors

close the channel

Functions

NYI when to stop reading?
read bytes from channel
write data to channel
get the peer's ip address (tcp)
get the peer's port (tcp)