Thread: Accessing my server from any other machine

  1. #1
    Registered User
    Join Date
    May 2011

    Accessing my server from any other machine

    I've been working with socket programming lately; and I'm currently making a server that listens on a port for incoming connections, then once it gets one, reads in a string and places it in a file.

    It all works fine when I'm telneting to the server from the server, but when I try and access it from anywhere else its as if it doesn't exist. Nmap doesn't show an open port -- from either the localhost or the remote host. It only works through telnet on the server its running from.

    The function's code is here. (pastebin)
    I know it's a mess, I'm still pretty unfamiliar with network programming. There really aren't any good in-depth tutorials that show you everything you need to know. I guess I'll have to buy a book...

  2. #2
    h ֆhr s Nor's Avatar
    Join Date
    Nov 2001
    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
    Try to help all less knowledgeable than yourself, within
    the limits provided by time, complexity and tolerance.
    - Nor

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Accessing my server from any other machine
    By screennameless in forum C Programming
    Replies: 0
    Last Post: 10-17-2011, 06:59 PM
  2. Replies: 4
    Last Post: 01-18-2008, 07:05 PM
  3. client server on same machine?
    By mwagiru in forum C Programming
    Replies: 4
    Last Post: 05-29-2003, 09:38 AM
  4. IDEA: A Slot Machine (aka a fruit machine)
    By ygfperson in forum Contests Board
    Replies: 0
    Last Post: 08-12-2002, 11:13 PM