Hi,
I've finally got a server and client working, thanks to the tutorials by technomage , Everythings pretty much working great, except when i try to free all the sockets in the server... i have the following code:
Code:
procedure TXServer.Finalize;
var
i: Integer;
socket: PTCPSocket;
begin
SDLNet_UDP_Close(fUDPSocket);
For i := 1 To fAllSockets.numsockets-1 Do
begin
socket := PXTCPSocketArray(fAllSockets.sockets)[i];
SDLNet_TCP_Close(socket);
End;
SDLNet_TCP_DelSocket(fAllSockets, fTCPSocket);
SDLNet_FreeSocketSet(fAllSockets);
fConnected := False;
end;
i always get an access violation on the following line:
Code:
socket := PXTCPSocketArray(fAllSockets.sockets)[i];
I dont get any troubles with the server and client running, just when i shutdown the server.
Any ideas would be great thanks
Bookmarks