Sign in to follow this  
nethackpro

socket on linux

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this