AddHandler + HTTPSocket?

Dim s As New HTTPSecureSocket
AddHandler s.PageReceived AddressOf socketActionDone

I get an error saying the PageReceived event doesn’t exist.

Any ideas?

You need a comma after PageReceived

Make sure the first parameter of your method is an httpsecuresocket.

I don’t remember, will the socket survive going out of scope?

It won’t. But I’m assuming this is a compile error.

Damn comma.

Also, the method needed parameters of:

s as HTTPSecureSocket, url as string, resultCode as Int32, h as InternetHeaders, content as string

Thanks everyone!

Well it could but its unclear from the code what AddressOf refers to
And that’s important

Joe wrote a great post once upon a time about this
http://www.monkeybreadsoftware.eu/listarchive-realbasic-nug/2011-03-26-4.shtml#263187