Entry Ticket Review for #digipen/cs260 ,
`bind()`:
- Binds an address and a socket together
- "If any packets show up at this address send them to me"
- bind works with both TCP and UDP
- comare to `listen()`
Arguments:
- Socket to bind to the address
- Pointer to a sock address to bind to the socket
- The length of the sock address provided
- returns 0 on sucess, != = on fail (WSAGetLastError for WinSock)
Socket Types:
- SOCKET_STREAM VS SOCKET_DGRAM
- Sockets h
Port Restriction:
- Depends on the [[Source Port]], typically 16 bits wide (eg. `unsigned short` / `u16`) so it would be in the range $0$ to $65535$.
`sendto`:
- SOCKET s - the socket we're sending through
- `const char* buffer, size_t length`, the data to send at its length in bytes
- Not null ter
- `sockaddr* dest_addr`, `size_t tolen` pointer to a socket address
- sizes & types are platform dependent