ballybeg
Member
Hey all,
I am working on a project that requires data transfer using TCPIP sockets. I am using a 3rd party Library (Ostrosoft) that handles the
wsock32.dll api calls.
The project calls for the creation of a header that logs into a user account. Here is the header:
In hex the result looks like this:
Header HEX
Start marker <4275878552> FE DC BA 98
MSN <0> 00 00
Message type <4096> 10 00
Message length <54> 00 36
Action code <4096> 10 00
Error code <0> 00 00
My questions are:
1) If I define the marker (value 4,275,878,552) what data type should it be
2) What function do I use to convert the values into a binary format?
The final complication is message has to be submitted in network byte order! How do I do that?
Assistance greatly appreciated.
ballybeg
I am working on a project that requires data transfer using TCPIP sockets. I am using a 3rd party Library (Ostrosoft) that handles the
wsock32.dll api calls.
The project calls for the creation of a header that logs into a user account. Here is the header:
Name | Length | Format | Value |
---|---|---|---|
Marker | 4 | Binary | 4,275,878,552 |
MSN | 2 | Binary | 0 |
Message Type | 2 | Binary | 4096 |
Message Length | 2 | Binary | 54 |
Action Code | 2 | Binary | 4096 |
Error Code | 2 | Binary | 0 |
In hex the result looks like this:
Header HEX
Start marker <4275878552> FE DC BA 98
MSN <0> 00 00
Message type <4096> 10 00
Message length <54> 00 36
Action code <4096> 10 00
Error code <0> 00 00
My questions are:
1) If I define the marker (value 4,275,878,552) what data type should it be
2) What function do I use to convert the values into a binary format?
The final complication is message has to be submitted in network byte order! How do I do that?
Assistance greatly appreciated.
ballybeg