|
******************************************
Welcome To CrazyEngineers (CE) – an online community of engineers from all over the world! With the younger CEan at 84 and the youngest at 16, CE boasts of professional engineers, students, professors, entrepreneurs, CEOs, geeks & nerds. We exchange innovative ideas, share knowledge, help each other and expand our worldwide network of engineers! You need not have a formal degree in engineering to be a part of CrazyEngineers! Need we say more? Join CE! | Be a CE Ambassador! | Forgot password? | Sponsor CE | Contact Us |
![]() |
| Sponsored links | |
|
|
|
|
CE - Apprentice
![]() ![]()
I'm a Crazy Electrical, Electronics Engineer
Join Date: 14th June 2008
Posts: 22
|
i guess you are asking the syntax to functions to make a basic server, to do this you need to use listen() first and then accept()
their prototypes are #include <sys/socket.h> int listen(int sockfd, int backlog); int accept(int sockfd, void *addr, int *addrlen); the sequence of system calls you will do is socket(); bind(); listen(); accept(); i hope you do know how to use socket() and bind() if not google it up or refer a good networking programming book cause you will have to take care of specifing addresses in host-byte order or network-byte order. There is a good guide to network programming on the net too, Beej's Guide to Network Programming , is short and concise. check it out. Also the above details is for gcc.
__________________
With complexity comes consciousness |
|
|
|
|
CE - Newbie
![]()
I'm a Crazy realisticdropcard Engineer
Join Date: 17th June 2008
Posts: 1
|
usually the socket is blocking unless you set it otherwise with ioctl
__________________
unique 100 dollar bill drop cards |
|
|
|
| Sponsored links | |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| Contact Us - Home - Impressum | Impressum - |