[Gambas-user] Eeek... help. Gambas 3, latest SVN

Anthony Ivan imperious.ldr at ...2360...
Mon Jan 24 08:09:37 CET 2011


Change the types to simple strings and both client and serversocket run 
perfectly.

If the server socket sends a String[] as below and the client attempts 
to Read as String[] the client dies in debugging with a signal 11 crash. 
If I change to object[]'s both client and server crash with signal 11 :(

On 01/24/2011 04:37 AM, Benoît Minisini wrote:
>> Hi Everyone...
>>
>> Once again a silly basic question - the answer to which is eluding me:
>>
>> I am trying to send a string[] of data from one computer to another....
>>
>> THUS on the server side:
>> Public Sub MessageClients(myMessage As String[])
>>     Dim varSocket As Socket
>>     For Each varSocket In Clients
>>       Try Write #varSocket, myMessage As String[]
>>     Next
>> End
>>
>> On the Client side....
>> Public Sub varSocket_Read()
>>       DIM myData as String[]
>>       If varSocket.Status<>  Net.Connected Then Return
>>       Try myData = Read #Last As String[]
>> End
>>
>>
>> The above creates a signal 11 failure. The data is being sent out from
>> the server. If I change things around to send and receive a simple
>> string there is no problem. The question is: How does one receive a
>> String[] array at the client end?
>>
>> Any insight greatly appreciated.
>>
>> Anthony
>>
> It should work.. :-)
>
> Please tell me where it crashes exactly (in the sender, in the receiver ?) and
> at which line.
>
> Try to write "As Object" instead of "As String[]" in the Read and Write
> instructions as a workaround to see if you have the crash too.
>
> Regards,
>


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: serversocket.txt
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20110124/a41588b5/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: client.txt
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20110124/a41588b5/attachment-0001.txt>


More information about the User mailing list