|
Sponge
CS144's user-space TCP library
|
Go to the documentation of this file.
18 if (
recvd.payload !=
"hi there" ||
recvd2.payload !=
"hi yourself") {
void sendto(const Address &destination, const BufferViewList &payload)
Send a datagram to specified Address.
Wrapper around IPv4 addresses and DNS operations.
void bind(const Address &address)
Bind a socket to a specified address with bind(2), usually for listen/accept.
void connect(const Address &address)
Connect a socket to a specified peer address with connect(2).
received_datagram recv(const size_t mtu=65536)
Receive a datagram and the Address of its sender.
A wrapper around UDP sockets.
void send(const BufferViewList &payload)
Send datagram to the socket's connected address (must call connect() first)