Solved

Problem with ISAPI DLL

Posted on 2001-08-14
2
185 Views
Last Modified: 2010-04-06
I am writing an ISAPI DLL and want it to connect to another program via a TClientSocket.
I am using a WebModule, drop on a socket component and have it open the socket in the beforeDispatch event.
then in the event of the action I have it send a string to the other app(which has a TServerSocket component in it)
now here's where the problem arises....
the dang thing never actually connects to the server...the address/port settings are correct, the socket just never gets opened.
to confirm this, I have the dll write to a file when it enters each procedure...and the onConnect procedure for the client socket never gets called(the Lookup procedure does)

I am at a loss, anyone have any ideas?
0
Comment
Question by:ckaneta
2 Comments
 
LVL 5

Accepted Solution

by:
KobiK earned 300 total points
Comment Utility
Just a thoght...
I think you need to use ClientType=ctBlocking in your ISAPI DLL (extension?)
meening you should use synchronic connection to the server or else the request to the ISAPI is done and onConnect will never fire if you use it asynchronicaly (ctNonBlocking is the default ClientType)

Something like this:
--------------------
  ClientSocket1.Address := '127.0.0.1';
  ClientSocket1.Port := 1234;
  ClientSocket1.ClientType := ctBlocking;
  try
    try
      ClientSocket1.Open;
      //WriteLog('OPENED');
    except
      //WriteLog('ERROR');
    end;
  finally
    ClientSocket1.Close;
    //WriteLog('CLOSED');
  end;

HTH
0
 
LVL 3

Author Comment

by:ckaneta
Comment Utility
I suspect you're right and that's just too damn bad because I can't have it be a Blocking socket...it needs to be NonBlocking.

I'll give it a day or so more to see if anyone has anything else to say.

Thanks for the answer, If it turns out that this is the only way to go, I may be back asking for more specifics on Blocking vs. NonBlocking sockets.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now