I have Two classes that I am porting from C#, SocketClient and SocketServer both Delegate Declarations are the same
VB Code:
'Delegate Declarations Public Delegate Sub MESSAGE_HANDLER(ByRef pSocket As SocketClient) Public Delegate Sub CLOSE_HANDLER(ByRef pSocket As SocketClient) Public Delegate Sub ERROR_HANDLER(ByRef pSocket As SocketClient, ByRef pException As Exception) Private GetMessageHandler As MESSAGE_HANDLER Private GetCloseHandler As CLOSE_HANDLER Private GetErrorHandler As ERROR_HANDLER
This is how its done in C#
I cant figure out how do to this in vb.netCode:'here is where i run into problems pClientSocket = AddSocket( new SocketClient(this, pSocket, pSocket.RemoteEndPoint.ToString().Substring(0,15), GetPort, GetSizeOfRawBuffer, GetUserArg, new SocketClient.MESSAGE_HANDLER(GetMessageHandler), new SocketClient.CLOSE_HANDLER(GetCloseHandler), new SocketClient.ERROR_HANDLER(GetErrorHandler)));
any ideas?





Reply With Quote