flat assembler
Message board for the users of flat assembler.
Index
> Windows > How to socket connect to internet ??? |
Author |
|
JohnFound 27 Apr 2012, 14:19
Hm, I don't have so good network programming skills, but IMHO, there is no difference between LAN and Internet socket connections.
|
|||
27 Apr 2012, 14:19 |
|
f0dder 27 Apr 2012, 16:01
JohnFound wrote: Hm, I don't have so good network programming skills, but IMHO, there is no difference between LAN and Internet socket connections. _________________ - carpe noctem |
|||
27 Apr 2012, 16:01 |
|
shutdownall 27 Apr 2012, 17:08
MinhHung wrote: Hello!!! What's your problem behind this subject ? If you are familiar with sockets you connect via Lan with ip address and port number. The same technique you can use for the world wide web (internet), just by use of public ip addresses. So where you think should be a problem ? |
|||
27 Apr 2012, 17:08 |
|
r22 27 Apr 2012, 18:03
You posted this on the Windows forum so your using Winsock API.
TCP/IP will work the same as on your LAN but you will need to configure your router and firewall to allow INCOMING connections to your server IP:PORT (this is where you have the listen socket). Also, when binding your listen socket be sure to bind it to 0.0.0.0 IP not an internal/subnet IP. |
|||
27 Apr 2012, 18:03 |
|
MinhHung 28 Apr 2012, 02:53
http://canyouseeme.org/ to get my IP
and i listen at port 1234 orther computer try to connect to my IP with same port ->could not connect ??? but with Lan it establish |
|||
28 Apr 2012, 02:53 |
|
JohnFound 28 Apr 2012, 06:48
Can you run other server applications on your computer? Bittorent clients or Skype for example? Are you behind a firewall or router?
It is probably because of your ISP. |
|||
28 Apr 2012, 06:48 |
|
Picnic 28 Apr 2012, 08:12
Notice that modern bittorent clients like μtorrent exploit router's built in UPnP (Universal Plug 'n Play) which allows automatic forwarding of ports.
|
|||
28 Apr 2012, 08:12 |
|
MinhHung 28 Apr 2012, 09:10
Sorry every body
i write it in C using winsock http://www.mediafire.com/?4avc0s4s6d2be3j I could not connect it via internet ??? |
|||
28 Apr 2012, 09:10 |
|
shutdownall 28 Apr 2012, 09:37
MinhHung wrote: Sorry every body Check your firewall settings. What is your public ip address of your chat server and what port is it running ? |
|||
28 Apr 2012, 09:37 |
|
typedef 28 Apr 2012, 12:16
Local Network
[x] You can connect to all computers by just opening Windows Firewall. Internet & Local [x]Open port in Windows Firewall and your router's firewall. Now in case you have a dynamic IP, then go to http://no-ip.com and setup a free DNS hosting account and download their client software. After that, go to http://yougetsignal.com and check your port if is it forwarded properly. You'll know if you did it right. Do not try to connect yourself to your public IP address as that creates a loopback. Only do this if your computer will be serving calls. Otherwise you can use a central server that'll handle calls. |
|||
28 Apr 2012, 12:16 |
|
MinhHung 01 May 2012, 11:35
Thanks!!! )
|
|||
01 May 2012, 11:35 |
|
F45mH4ck3r 08 Mar 2013, 04:55
@MinhHung
The Internet consists of computers around the world linked together, therefore known as a Wide Area Network (WAN). Each Server-Socket is bound to a local Network Interface where it listens for incoming requests. Create a Server-Socket and bind him. To a Local Network Interface Replied the socket in Listening-Mode. If the Server-Socket accepts an incoming connection, it creates a new Socket, which is then used to communicate with the client and listen again on the server socket for incoming requests. With UDP, the Server-Socket is not bound to an interface. A Client-Socket is not bound, and can be used freely. The Port is important only above the IPv4/IPv6 Protocol. On Windows you can use the command netstat -anov to check if the Port and the Protocol is already in use by another application. If the Port and the Protocol (TCP/UDP) is already in use by another Program, then you have to look for a free port. These ports are usually already covered: Port: 20.21 → FTP Port: 25 → SMTP Port: 53 → DNS Port: 80 → HTTP (Web-Server) Port: 110 POP3 → Port: 137,139,445 → Windows Network. It is important that the router incoming connections from the WAN to the local IP address of the server is released. Example: WAN: 77.22.33.44 TCP/UDP → LAN: 192.168.1.20 TCP/UDP I can post a Sample-Code if you want !? Sorry for my bad English, I'm German. |
|||
08 Mar 2013, 04:55 |
|
winx 21 Mar 2013, 01:40
We have the same idea in project and I've tried the solution by Checking my firewall settings..it really works!
|
|||
21 Mar 2013, 01:40 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.