Sorry for the vague title, I'm finding it hard to describe the problem accurately in a few words (but that's probably because of me, English is not my native language).
I'm trying to send a file from one computer to another via TCP. My server/reciever is directly connected to the internet (at least, that's what I suppose, I'm hiring this room and the internet is included, I have no idea about the set-up, it's really plug-and-play for me), the other one is connected to a WLAN (from the wireless router of one of my housemates, so my housemates also have acces to this network). The first three bytes from the IP-adresses are the same (I checked via whatsmyip.com).
I send and recieve in a blocking way (so non-asynchronous). When I try to send a short message, the sender/client crashes with a timeout error. I then tried to ping the other IP adress, but this one times out too! Even more surprising (to me, at least) was that the ping the other way around works fine (so from the machine that is directly connected to the internet, to the machine that is connected to the WLAN). If anything, I would expect it the other way around (because I understood that it could be a bit of trouble to connect to anything behind a firewall/router).
So: ping from WLAN -> directly connected machine (what is the right term for this?) times out, but directly connected machine -> machine on WLAN works fine.
As you may have understood (by analyzing my usage of terms), I really have no clue about networks. I followed a course (I'm a computer science student) two years ago (half of it was on computer architecture, and half of it on networking). I've always used existing networks (my dad used to handle that when I lived at home, and now the organization where I'm hiring from). Could anyone explain to me what is going on, and possibly help me with it? (I didn't provide my source for the send and recieve programs, because I think that once I understand what is going on I am able to fix it myself).
Greetings and thanks in advance to anyone who takes the time to help me! :)