Dart Home | PowerTCP Winsock for ActiveX | Custom Development | Reply | PowerTCP Winsock for ActiveX Topics | Forums |
Author | Forum: PowerTCP Winsock for ActiveX Topic: Using PowerTCP Winsock in a DLL |
kenk From: Boxford, MA USA Posts: 4 Member Since: 12/01/07 |
posted December 4, 2007 11:53 AM Hi, I created a DLL in VB6.0 and included a reference to the DartSock.dll. I declared it in a Class module as Public WithEvents Session As Tcp I compiled the dll successfully and now am trying to use it in an ASP page. I am able to make connections from ASP and send data....but I am not receiving data. My question is.... Is there something I am overlooking when using the dart control in a dll that is referenced by an ASP page? Best regards, Ken |
Amit From: Rome, NY USA Posts: 315 Member Since: 03/15/06 |
posted December 4, 2007 3:46 PM Hi Ken, What is tcp1.timeout set to? I have just used following code to write an ASP page and was able to receive the data being sent to an echo server: <% dim Tcp1 dim host dim result host = "ServerName" set Tcp1 = Server.CreateObject("Dart.Tcp.1") Tcp1.Connect host, 7 Tcp1.Send "Send Data" result = "" Tcp1.Receive result Response.Write ("Result: " & result) Tcp1.Close() Response.Write "Completed" %> Are you seeing something different when you try the above code? Best Regards, Amit ------ |
kenk From: Boxford, MA USA Posts: 4 Member Since: 12/01/07 |
posted December 4, 2007 4:18 PM Your example looks good if I was creating the socket directly in the ASP page. What I did was compiled my own dll that contains a reference to the dart socket and have written the Send/Recv routines there. So my dll actually contains all the socket support for my ASP page. Know what I mean? Thanks for the speedy reply! Best regards, Ken |
Amit From: Rome, NY USA Posts: 315 Member Since: 03/15/06 |
posted December 6, 2007 5:27 PM Hello Ken, I have created my own Active X DLL to send and receive data from an echo server. I have called this DLL from an ASP page and was able to send as well as receive data. I would request you please call receive multiple times till the time entire data is received. Best Regards, Amit ------ |
kenk From: Boxford, MA USA Posts: 4 Member Since: 12/01/07 |
posted December 6, 2007 6:29 PM Hi Amit, I was expecting to get the Receive event fired when data arrives...i.e. I wasn't polling for the data. Do I have to poll for data when using the Dart Winsock in an ActiveX DLL? Ken |
Amit From: Rome, NY USA Posts: 315 Member Since: 03/15/06 |
posted December 12, 2007 6:09 AM Hi Ken, I apologize for the delayed response. Yes, you have to call receive multiple times to get the desired result. Best Regards, Amit ------ |
kenk From: Boxford, MA USA Posts: 4 Member Since: 12/01/07 |
posted December 12, 2007 8:28 AM So for future reference, if I use the Dart TCP Winsock control in a form, I can use the Receive Event. If I use the Dart TCP Winsock control without a form like in a dll), I need to poll to get data....regardless if I declare it WithEvents. Right? Thanks Amit. Best regards, Ken |
Reply | PowerTCP Winsock for ActiveX Topics | Forums |
This site is powered by PowerTCP WebServer for ActiveX |