I want an ATL COM DLL **(NO MFC)**, made in Visual C++ 6 which can be loaded in Visual Basic with the following command: 'Private Withevents w as clsWinsock'.
- BytesReceived (Get)
- LocalHostName (Get)
- LocalIP (Get)
- LocalPort (Get, Set)
- Protocol (Get, Set) [*TCP* & *UDP*]
- RemoteHost (Get, Set)
- RemoteIP (Get, Set)
- RemotePort (Get, Set)
- SocketHandle (Get)
- State (Get)
- OnError( Number, Description )
- OnSendProgress( BytesSent, BytesRemaining )
- OnDataArrival( BytesTotal )
- OnConnectionRequest( RequestID )
- OnConnect( )
- OnClose( )
- Accept( RequestID )
- Bind ( [LocalPort], [LocalIP] )
- Close ( )
- Connect ( [RemoteHost], [RemotePort] )
- GetData( VarData, [VarType], [MaxLen] )
- Listen( )
- PeekData( VarData, [VarType], [MaxLen] )
- SendData ( VarData )
It has to be asynchronous, I have to be to create multiple sockets with ease (no mem overhead and such).
If you do know how to code this in C++, but don't know about the ATL, please tell me so. I can guide you through the principals, but I just don't have time enough to create this myself.
Some things I've to add:
- You will need to work via a wrapper class to the winsock-api's (you will need to wrap the functions of the api, to self made functions ... For example a connect will always be sent through to the connect-API, but winsock2-API's who does not exist in winsock1 interface, will need to be coded with the assistance of this particular api's). [So this should look _DYNAMICALLY_ to the winsock version on the target system.!!!]
- If you will build a clsHTTP upon this very project (which is just a clone of the wininet-component), please tell me so.
- For those who did not get it: this component will be a clone of the windows winsock control.
Windows (any of it), Both winsock1 AND 2!