RNAGENE Junior Member Posts: 8 From: United States Registered: 02-28-2007 |
I'm trying to send information or emails to individual websites. Then the thought came to me that I should send it to anyone but the routine I wrote does not work. My documentation lacks information on TCP and UDP. Function advertise();theMsg$ [This message has been edited by rnagene (edited March 01, 2007).] |
SSquared![]() Member Posts: 654 From: Pacific Northwest Registered: 03-22-2005 |
TCP and UDP require someone listening to the incoming signal. You can't just send something and expect everyone to hear it. In this sort of typical client/server design, the client opens a listenting port and the server sends to the listening port. I don't know what language you are using, but based on what I can tell, it looks like you are creating random addresses of where to send your data. In order for this to work, you must SEND and RECEIVE on the same known port. To get this working, you will need to create a listening client and a sending server. Your code appears to be more like a server with no one listening. Rather than using a random address, you will need to use a known address. You should try something like 'localhost' for the hostname. I suggest getting the client and server up and running on your local machine ('localhost') and then try communicating with another computer. I can't offer much more than that as I do not know the language you are using, but all languages typically follow similar patterns. Look at this site: http://www.cs.rpi.edu/courses/sysprog/sockets/sock.html for some help on sockets. It's kind of a long read, but covers what you need to know. |
RNAGENE Junior Member Posts: 8 From: United States Registered: 02-28-2007 |
This was written in BB2D. |