Jump to content
  • Advertisement
Sign in to follow this  
nethackpro

socket on linux

This topic is 4634 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!