[RESOLVED]Ip addresses and winsock
Ok so me and my friend are making an file sharing and I.M. program that only sends messages and files to one central computer and me and him will retrieve our files and messages off that computer. But we need to know how can we send files and messages using winsock if we know the ip of the central computer.
Re: Ip addresses and winsock
Well, when you connect to any server, you need to know server IP, and port number...
What exactly are you asking about ?
You don't know how to send a file through winsock ?
Is the server a program made by you (did you make the server already ?) ?
Did you do anything ? (what have you done so far ?)
Re: Ip addresses and winsock
I don't know how to do anything with winsock. I have not started yet.
Re: Ip addresses and winsock
If I'm not mistaken there are sample client/server winsock projects in the codebank.
Re: Ip addresses and winsock
In that case, you should start learning from tutorials, unfortunatelly I don't know any from the top of my head, but if you do a search on the forums, I'm sure you will find posts with links to tutorials.
If you want to see some programs that use winsock, here are 2 programs that you might find usefull:
Web Server: http://www.vbforums.com/showthread.php?t=283785
Chat program: http://www.vbforums.com/showpost.php...2&postcount=43
Send files (client/server program): http://www.vbforums.com/showthread.php?t=377648
Re: Ip addresses and winsock
so is it possible to send it to my other comp even if it isnt the same network.
Re: Ip addresses and winsock
In any case, you need to know the IP, and Port number.
If it's on the same network, the port has to go through the firewall (if firewall is enabled that is...)
If it's through the internet, the server computer has to be routed properly (the router has to be configured so that it routes the server's port number, to the server), and of course, the same story with the firewall (i.e. it has to be configured so that the port has to go through the firewall)
So, in short, yes, you can send a file to any computer in the world, if everything it's configured properly (router + firewall)