Mark Talluto wrote:
>
> I am very excited about the possibilities with networking with MC. I
> decided to write the most simple chat program I could. My problem is that
> the program does not work reliably. If it did not work at all, I would be
> ok with that. If it worked all of the time then that would be even better.
> But why would it work some of the time?
>
> I am sure this has to do with my lack of understanding of how this all
> works. Would you guys please look at yet another attempt to make this work
> and set me on the right path.
>
> Both computers have the same stack. My server code is implemented on the
> open card.
>
> on openCard
> accept connections on port 8080 with message "newconnect"
> end openCard
>
on newconnect s
read from socket s for 1 line
put it into tLength
read from socket s for tLength
put it into field "receive"
close socket s
end newconnect
>
> My sending code is in a button. There is a send field and a receive field.
> Here is the send code.
>
> on mouseUp
> open socket to "192.168.0.4:8080" with message sendIt
> end mouseUp
>
on sendIt s
put field "send" into tdata
write the length of tdata & crlf & tdata to socket s
close socket s
end sendIt
>
> Sometimes the message shows up in the receive field and sometimes it does
> not. Please help.
>
> -Mark Talluto
>
> Archives: http://www.mail-archive.com/[email protected]/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.