![W&T 57630 Manual Download Page 110](http://html1.mh-extra.com/html/wandt/57630/57630_manual_3082028110.webp)
110
W&T
TCP / UDP - Binary
WORD send_sequence;
WORD rec_sequence;
WORD struct_typ;
WORD length;
WORD set_bits;
WORD value;
}
SETBIT;
The
Variables
are in this case byte-aligned „Lowbyte First“ in
memory.
To achieve byte alignment even for structures consisting of dif-
ferent variable types, please use the compiler option #pragma
pack(1).
#pragma
pack(1);
typedef struct _COUNTER
{
word send_sequence;
word rec_sequence;
word struct_typ;
word length;
word
counter_index;
long
counter_value
}
COUNTER;
#pragma
pack()
Byte alignment in memory is important so that for example the
sequence of bytes resulting from passing a pointer to the
structure can be inserted directly into a TCP packet.
Visual Basic 5 and 6
Visual Basic offers the programmer the every easy-to-use
Winsock control element for network communication via TCP/
IP.
Unfortunately the VB Winsock control element does not allow
working with structures. Instead, data communication is handled
using string variables.
Summary of Contents for 57630
Page 8: ...8 W T Content...
Page 22: ...22 W T Assigning the IP address...
Page 44: ...44 W T configuring the network parameters...
Page 194: ...194 W T Diacnostics and testing...