I am having trouble with receiving data longer than 72 characters.
As soon as I SendNetworkString() of 73 or more characters the application crashes and reports "Invalid memory access" and highlights this line.
Code: Select all
NetEvent = NetworkServerEvent()
I can receive data if it is less than 73 chars.
Here's the chunk of code in question:
Code: Select all
; check network events
NetEvent = NetworkServerEvent()
Select NetEvent
Case 1 ;New client connected
Case 2 ;Raw data
ClientID = NetworkClientID()
Buffer.l = AllocateMemory(64)
ReceiveNetworkData(ClientID,Buffer,64)
RecdText = Trim(PeekS(Buffer))
Debug "Recd: "+RecdText
SetGadgetText(#txtRecdText,"Text Received at "+FormatDate("%hh:%ii:%ss", Date())+" :")
SetGadgetText(#strRecdText,RecdText)
FreeMemory(Buffer)
Case 3 ; A file has been recieved
Case 4 ; Client disconnect
EndSelect
Is it a bug or am I making a stupid mistake somewhere?