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

Benoît Minisini gambas at ...1...
Sun Jan 23 16:37:04 CET 2011


> 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,

-- 
Benoît Minisini




More information about the User mailing list