Intrafoundation Software
Making Atomic Warfare Fun Again
 

Need a shoulder to cry on while trying to convince Windows to properly work with our software? Just want to chat about something related to the site? Feel free to use the forums slash news slash blog.

(Unsolicited commercial spam will be deleted, obviously.)

[Looking for something?]
Looking for something?
This is thread 98. The complete list of threads is available on the main forums page.
Subject: UDPClient & BIND
Author: ZilverZtream
Date/Time: 5/29/2002 5:44:06 PM (98.0)
Hi.

I downloaded your UDP client and everything worked fine except for one small thing... I couldn't BIND a port.

I'm making a ASP script that communicates with a server that sends data back on a specific port and there for I need to bind that port.

But, that doesn't seem to be possible with your UDP client.

What i'd like to be able to do is something like:

<%
Dim port
Dim ip
dim obj
dim c

ip = "111.111.111.111"
port = "1122"

set obj = server.CreateObject("Intrafoundation.UDPClient")

c = obj.Open( ip , port)
c = obj.bind = "1111"
%>

If you could add this to your COM object I'd be SO happy.

--------------------------
Email: zilver@redbull.nu
Subject: RE:UDPClient & BIND
Author: ZilverZtream
Date/Time: 5/29/2002 5:46:15 PM (99.98)
Ohh.. my code got cutoff.

What I'd like to do be able to do is something like:

dim ip
dim port
dim obj
dim c

ip = "the_ip"
port = "the_port"

set obj = server.CreateObject("Intrafoundation.UDPClient")

c = obj.Open( ip , port)
c = obj.bind = "1111"
Subject: RE:UDPClient & BIND
Author: Lewis A. Sellers
Date/Time: 5/30/2002 12:23:13 PM (100.98)
Well... the COM is designed to be a "client". I think what you're wanting to do essentially is to set it up as a "server". That is you're wanting it to persist after the asp page and continue collecting data and respondng to it?

The way it's setup now you can only send/recv so long as the asp script is running. You can set up a loop and bump up the timeouts, etc but when you get to the obj.close at the end of the page to connection is terminated.

Have I missed your point?

--min


Subject: RE:UDPClient & BIND
Author: Lewis A. Sellers
Date/Time: 5/30/2002 12:27:11 PM (101.98)
btw, I might point out that when you do an "Open" it actually DOES do a berkley class bind to that ip:port. Snipped from the udp class itself:

int nbind = bind(sock, (struct sockaddr*)&locala;, sizeof(locala));

So maybe something else is going on? Firewalls maybe? Do any of the examples work?

--min



REPLY
Author:
Subject:
Your
Message:
Email: (optional)
(Note: For safety all HTML in your message text may be printed exactly as you typed it.)
top