Board index » delphi » TP1.5 & Winsock help needed

TP1.5 & Winsock help needed

Hey all...

I've been playing around a bit with a winsock unit that I found floating
around somewhere.  Unfortunately, I'm not the best OWL programmer in the
world, and the sample apps are are using wincrt and not much else.

Anyway, I have an OWL app that I want to be a server of some sort.  If I try
to connect to it, the winsock.dll is supposed to send my app a message so I
know when to open up a socket.  Easy enough.

BUT, I can't trap that message.  I've got a procedure defined something like:

procedure connectsocket(var Msg : TMessage); virtual cm_first or wm_user;

Trouble is, when I request a socket from a remote host, I can't trap the
message.  I know it's trying because my client will wait and wait, and when I
shut down the server, the client returns a message that the connection was
reset.  Is this making sense?

So, assuming my procedure declaration is wrong, how do I trap that message?  
Anyone have any sample code? Help! Argh!

Regards,
Brian

 

Re:TP1.5 & Winsock help needed


Hi there Brian,

manlr...@nicoh.com (R. Brian Manley) wrote:

Quote
>I've been playing around a bit with a winsock unit that I found floating
>around somewhere.  Unfortunately, I'm not the best OWL programmer in the
>world, and the sample apps are are using wincrt and not much else.

>Anyway, I have an OWL app that I want to be a server of some sort.  If I try
>to connect to it, the winsock.dll is supposed to send my app a message so I
>know when to open up a socket.  Easy enough.

How hard/easy is it to use WinSock? I'm thinking of writing a bit of internet
software, and was going to use the library you mensioned.

TTFN and TC, Michael Dales, official nice person.

Other Threads