E.V.I.C.T.  B.V.
Edwin Vermeer Information Communication Technology.
Google
 
Web SITESKINNER.COM



home / open source software / Generic Client Server

Your browser does not support webstandards: please upgrade your browser before proceding.(klick here for more information about web standards)

Generic Client Server

The GenericClient object can be used to create any sort of client application and the GenericServer object can be used to create any sort of server application. This object will hide the difficulties in the Winsock API calls for you and it stimulate developing in an object oriented way. You will probably write your own protocol handler (like SMTP, POP or ...) using the OnDataArive event.

A demo is included that show you how to make a simple chat application. Also a demo is available that shows you how to do port mapping. If you want more samples, then have a look at tha SMTP and POP library

Click here to download the complete source code, the compiled DLL and the demos.

Credits: The (super) SubClass code is from a publication from Paul Canton [Paul_Caton@hotmail.com].
The winsock stuff is inspired by a publication from 'Coding Genius'.
The Exception hanler is based on a publication from Thushan Fernando.

How you can use the EVICT_GenericClientServer.dll

' Just copy this code in a new form in a VB6 application
' and see what happens in your debugging window.
' Don't forget to make a project reference to the dll.
Private WithEvents cClient  As GenericClient
Private Sub Form_Load()
   Set cClient = New GenericClient
   cClient.Connect "ftp.microsoft.com", CLng(21)
   cClient.Connection.Send "help" & vbCrLf
End Sub

Private Sub Form_Unload(Cancel As Integer)
   cClient.Connection.CloseSocket
   Set cClient = Nothing
End Sub

Private Sub cClient_OnConnect()
   debug.print "Client connected to " & _
      cClient.Connection.GetRemoteHost & _
      "(" & cClient.Connection.GetRemoteIP & ")" & _
      " on port " & cClient.Connection.GetRemotePort
End Sub

Private Sub cClient_OnDataArrive()
Dim strData As String
   cClient.Connection.Recv strData
   debug.print strData
End Sub
 
Cool! Planet-source-code
Thums up! Get Firefox! Valid HTML 4.01! Valid CSS!