socket on linux
Ok, Iv'e read tutorials and man pages and I'm still lost. Im tryng to set up a socket to accept telnet connections. Heres what Ive got so far #include <sys/socket.h> int main() { int MySocket = socket(PF_INET, SOCK_STREAM, 0); return 0; } I cant figure out how to bind. I don`t know what to enter in for const struct *my_addr Any help would be greatly appreciated
This might help:
http://www.csee.wvu.edu/~tmont/cs453.html
Go to that site and grab the Echo TAR.GZ file (it's near the bottom). It has a full example for a simple socket application.
Cheers,
--Brian
http://www.csee.wvu.edu/~tmont/cs453.html
Go to that site and grab the Echo TAR.GZ file (it's near the bottom). It has a full example for a simple socket application.
Cheers,
--Brian
I learned sockets from Beej's guide. It's by far the best simple guide that I've seen, and once you've learned everything on those pages, the manpages should be enough for anything else you need.
"Pfft, Facts! Facts can be used to prove anything!" -- Homer J. Simpson
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement