Beej's Guide to Network Programming
The best network programming guide i know of, and if you really like it, you'll buy the book.

Check your firewall settings and ensure that the port you setup is accessable from other terminals
And if your trying to access the server from the other side of a router, make sure the proper ports are fowarded to the server.

P.S. check out this post when you need to show us code. Announcements - General Programming Boards