wip first connexion
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
- **htons, htonl, ntohs, ntohl :** converts the unsigned short or integer argument between host byte order and network byte order
|
||||
- **poll :** waits for one of a set of file descriptors to become ready to perform I/O
|
||||
- alternatives : select, epoll (epoll_create, epoll_ctl, epoll_wait), kqueue (kqueue, kevent)
|
||||
- **socket :** creates an endpoint for communication and returns a file descriptor that refers to that endpoint
|
||||
- **socket :** creates an endpoint for communication and returns a file descriptor that refers to that endpoint
|
||||
- **listen :** marks a socket as a passive socket, that is, as a socket that will be used to accept incoming connection requests using accept()
|
||||
- **accept :** used with connection-based socket types. It extracts the first connection request on the queue of pending connections for the listening socket, creates a new connected socket, and returns a new file descriptor referring to that socket. The newly created socket is not in the listening state. The original socket is unaffected by this call
|
||||
- **send :** used to transmit a message to another socket. May be used only when the socket is in a connected state (so that the intended recipient is known). The only difference between send() and write() is the presence of flags. With a zero flags argument, send() is equivalent to write()
|
||||
@@ -72,5 +72,8 @@
|
||||
## ressources
|
||||
|
||||
- [create an http server](https://medium.com/from-the-scratch/http-server-what-do-you-need-to-know-to-build-a-simple-http-server-from-scratch-d1ef8945e4fa)
|
||||
- [guide to network programming](https://beej.us/guide/bgnet/)
|
||||
- [same, translated in french](http://vidalc.chez.com/lf/socket.html)
|
||||
- [bind() vs connect()](https://stackoverflow.com/questions/27014955/socket-connect-vs-bind)
|
||||
- [INADDR_ANY for bind](https://stackoverflow.com/questions/16508685/understanding-inaddr-any-for-socket-programming)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user