Hi everyone, I'm was learning about sockets and winsock and I figured why not make a chat program, since most tutorials were saying it was excellent practice, and before I started I just wanted to know if there's a way to make it more than LAN capable, because the last time I tried to make a chat program (VB.NET), it only worked locally, and so I was just curious, I am using Dev-C++ 5.0 beta 9.2 (4.9.9.2) in case anyone would need that to help me out. Thanks in advance!!!
Well, my knowledge of Winsocks is limited, but as far as I know, you just pass an IP and a port to a function and the connection is established (or not). This one time, I wrote a simple remote control app with Winsocks, and it could be used both across a LAN and across the Internet (with varied transfer rates, of course).
Lemme tell ya, there's nothing like uploading an image and changing the wallpaper of some guy in Hong Kong
I wrote a simple remote control app with Winsocks, and it could be used both across a LAN and across the Internet (with varied transfer rates, of course)
Hilarious (The whole Hong Kong thing). Would you mind posting or PMing me your code so I can have a shot at this, because the worst part about VB.NET was that it required .NET and so I had to go through with installation of that first, but yeah if I can get the source so I can see if theres a difference in the LAN and WAN coding I would appreciate it.
So if I were for example to goto my friends house or sent my buddy a chat program and we were both running on a IPv4 network, and his ip is like 78.xx.xx.xx and mine is 173.xx.xx.xx and he's in the USA and I'm in Canada it would work?
It would work. However, only one IP is necessary to establish the connection. One of the programs will act as client, dialing to the server, while the other end will act as server and listen for incoming connection attempts on a given port (something above 1024, I think).
Now that we're talking about IP versions, does anybody know what's this whole new IP version (v7, was it?) deal, and how could it possibly work with the existing IPv4 infrastructure?
Legend: I don't think so. But the solution doesn't have any dependencies that I can remember, so you should be able to create your own projects for Dev-C++.
jsmith: Yeah. v6, that's what I meant.
I imagined something like that must have happened. It's odd that this is the first time I heard it, though. I probably should have read the Wikipedia article more closely.
@Legend: Dev-C++ cannot open .sln files. They are Microsoft visual studio solutions.
@JSmith, @Helios: IPV6 is an upgrade to the IPV4 protocol specification. It allows for larger addresses and subsequently more addresses on the net. Most current Operating Systems have built in support for it, and it's not uncommon for companies to run IPv6 internally.
There has been talk about moving the internet to IPv6 for many years now, and each year it gets more pressing as the number of available IP addresses in the current system drops heaps each year. Coupled with recent flaws identified in the DNS subsystem even affecting the root DNS servers they may finally make the move. That or implement something like secure DNS.
The tutorial I was reading was kinda tougher than I expected it was Beej's Networking tutorial (or something close to that), I figured since I don't get it i'll probably just ending up copying and pasting, but since i want to learn, would there happen to be an easier tutorial on networking or am I stuck with this one?