PDA

Click to See Complete Forum and Search --> : Winsock - ucp protocol


bcx7
May 26th, 2000, 11:04 AM
how can i get the ucp socket protocol to work in a winsock 5.0 control?

i know how to use the tcp protocol and get information from A to B and it works fine but you have to make a connection (plus you need to know the other computers' ip address).

i want the data i send to go to any computer on the network that has this program running.

i read somewhere that you don't have to make a connection if you want to send data using ucp. is this true?

i also read that if you leave localport and remoteport blank or 0 the computer(s) choose. is this also true?

i really want to make the program that i'm working on for two computers to communicate.


Both computers have vb5 Enterprise Edition installed, have the same winsock control (5.0) and have windows 98 running (one is first edition the other is second edition)


i want somebody to help me because i've read the section (in the vb help file) on winsock and all the events for winsock & properties about a million times and i can get ucp protocol to work!

shaba
May 26th, 2000, 10:45 PM
I have been doing a little work with transfer protocols, so here's my two cents. From what i understand, although the UDP protocol is a connectionless protocol, it still a peer-to-peer protocol. That is, you need to know who you are talking to. The only difference between the TCP and the UDP protocol is the guarantee of data transfer. With TCP, you establish a connection to the remote computer, and data transfer is guaranteed. A UDP protocol just sends off a message to the remote computer, but doesn't neccesarily get back a reply. One thing you might want to do is this. (please keep in mind that i am no expert). Create a winsock control array and set each control to the ip address of the computers on your network. Set each of these controls to connect. Then cycle through the array and see if any of them establish a connection. Then select only those IPs that did and perform any operations you need to. This way, your program will poll all the computers and only talk to those that are running your program. If you use the TCP protocol and set your client computers to "Listen" i am fairly sure this will work.

let me know if this works out,

Shaheeb R.

bcx7
May 31st, 2000, 04:53 PM
the computers i have at home i can change the ip. but if i was to give it to someone else who has their ips set to automatic, then it won't work out.

i have two computers at home. we'll call one amd and the other one ibm. i want to make a program that tells the person on the amd if the ibm is on and vice-versa. it's tells you via a systray icon. but if i was to give it to someone else, they won't be able to use it because they won't have the ips as my two computers. (especially if thier ip is set to automatic). don't want the person using my program to have the hassle of changing thier ip to suit the program. how could i get around this?

could i do something with the computers name?

or what about another way of sending data over a network?

privoli
Jun 4th, 2000, 03:00 PM
http://www.dynip.com

You can download a client which will provide your computer with a static hostname each time your IP address changes.

yourname.dynip.com

will always point to your IP address, give it a try.

bcx7
Jun 10th, 2000, 11:53 AM
this means that i have to put that program with my program plus you only get 30 days (shareware).


i've noticed that if you put TCP/IP to automatic, the subnet mask is 255.255.0.0 and the ip is always

169.254.x.x


what about if was to get a winsock control and tell it to check every ip from 169.254.0.0 to 169.254.255.255. if it finds an ip, then i makes a connection with it and also makes a new winsock control during runtime and get that to start checking through all the ips until it's found all of the online computers.

is it possible to write the name of the computer's name you are trying to connect to instead of the ip?


and another question - how could i find out (once it's made a connection) the remote computer name that my computer is connected to? (using winsock)