I n t r a F o u n d a t i o n  S o f t w a r e
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.)


This is thread 98. There complete list of threads is available on the main forums page.

Subject: UDPClient & BIND
Author: ZilverZtream
Date/Time: 2002 May 29 05:44.06PM (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: 2002 May 29 05:46.15PM (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: 2002 May 30 12:23.13PM (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: 2002 May 30 12:27.11PM (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:
Email:
Subject:
Your
Message:


top