My question goes as follows :

I am trying to "talk" to an SMS server through its TCP port. This little guy sends packets with defined structures.
I have enough documentation to recreate these structures in VB but I cant figure out how to have the Winsock Control receive such packets.

Let me give you an example :

Code:
Public Type Header_data
    Length As Integer
    CorrelationNumber As Integer
    MessageType As Byte
    Operation As Byte
    Unused As Integer
End Type
I would like to do something like :

Code:
Dim Header as Header_Data

'... (whatever)....'

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    Winsock1.GetData Header
End Sub
But it seems that Winsock does not accept User Defined Type as parameter...

Is there a way to do this ???




[Edited by Coolhp on 08-20-2000 at 05:41 PM]