Looks like the perfect network library for my use. I started writing a test program and quickly ran into problems with server initialization.
[pascal]
var
EAddress: ENetAddress;
EServer: pENetHost;
FHost: String;
FPort: Word;
FMaxConnections: LongWord;
FInboundBandwidth: LongWord;
FOutboundBandwidth: LongWord;
EAddress.host := ENET_HOST_ANY;
EAddress.port := FPort;
EServer := enet_host_create(@EAddress, FMaxConnections, FInboundBandwidth, FOutboundBandwidth);
[/pascal]
I get "Abnormal program termination".
However, when I change the enet_host_create to this:
[pascal]
EServer := enet_host_create(@EAddress, 32, 0, 0);
[/pascal]
it works... What's wrong with passing the parameters? The parameters to the function are defined as LongWords in the wrapper.
EDIT: Nevermind... I had left one of the parameters uninitialized, doh!
Bookmarks