Solved

Problem with ISAPI DLL

Posted on 2001-08-14
2
202 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
KobiK earned 300 total points
ID: 6386166
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
ID: 6394654
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 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