Link to home
Start Free TrialLog in
Avatar of addicktz
addicktz

asked on

vb.net sockets function :: 2/3 :: need explained

Please explain the lines with the *** next to them.


Public Class StateObject
***     Public workSocket As Socket = Nothing
           Public BufferSize As Integer = 32767
***     Public buffer(32767) As Byte
***     Public sb As New StringBuilder
End Class


Private Sub sockConnected(ByVal ar As IAsyncResult)
            Try
                If client.Connected = False Then RaiseEvent onError("Connection refused.") : Exit Sub
                Dim state As New StateObject
***          state.workSocket = client
***          client.BeginReceive(state.buffer, 0, state.BufferSize, 0, AddressOf sockDataArrival, state)
                RaiseEvent onConnect()
            Catch
                RaiseEvent onError(Err.Description)
                Exit Sub
            End Try
        End Sub
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Sure, where did this come from?

Bob
How much do you want explained here, above what was already explained?

Bob
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of addicktz
addicktz

ASKER

thank you, do u mind taking a look at some of my other questions under vb.net ? I would appreciate it =)