Solved

Problem with ISAPI DLL

Posted on 2001-08-14
2
191 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
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

831 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