Problem with streams and sockets

This is a discussion on Problem with streams and sockets within the C# Programming forums, part of the General Programming Boards category; Ive been trying to get a server/client application ive made to work across different computers. On the same computer, everything ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    27

    Problem with streams and sockets

    Ive been trying to get a server/client application ive made to work across different computers. On the same computer, everything works fine. On different computers though, the server and client dont connect. Someone told me it might be because of a firewall. Does anyone know how I can fix this?

  2. #2
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,109
    There can be various reasons.

    If it works by using the loopback adres to connect to the server ( server and client local ) then it's indeed because of some firewall - router issue.

    First define "On different computers" :

    Are they on the same subnet connected trough a switch ?
    Or are they not on the same subnet ?

    If they are on the same subnet and connected trough switch then there should be no problem. However when they are not on the same subnet then you should configure your router which connects the other network ( be it the internet or some other network ) to your network .

    You could for instance forward all tcp traffic with let's say destination port 40000 ( if thats the port the server application is listening on ) to the host where the server is running on.

    Then at the client side you should use the ip adres of the routers interface which is connected to the other network ( so not the network where the server is located ) if it's over the internet then you should use the ip your isp assigns you ( or just check the routers interface ip ).

    Anyhow I think you should be more specific as to how the network topology is like and how the client - server is related to each other , network wise.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Peeking at streams
    By Achy in forum C Programming
    Replies: 13
    Last Post: 06-12-2006, 03:46 AM
  2. Streams And Sockets?
    By DeepBlackMagic in forum Networking/Device Communication
    Replies: 5
    Last Post: 07-21-2003, 06:30 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21