Confirmed users
214
edits
Line 18: | Line 18: | ||
The following interfaces should be synchronous/RPC-style. | The following interfaces should be synchronous/RPC-style. | ||
To create a socket: | To create a socket: | ||
nsresult SocketCreate(PRNetAddr* requested_address, SocketHandle* handle); | |||
You pass in a PRNetAddr with an IP address but an empty (0) port. | You pass in a PRNetAddr with an IP address but an empty (0) port. | ||
On success, the port is filled in. | On success, the port is filled in, and the handle is valid. | ||
To destroy a socket: | |||
nsresult SocketDestroy(SocketHandle handle); | |||
This effectively closes it. | |||
==== Packet Transmisson and Reception ==== | ==== Packet Transmisson and Reception ==== |