Björnke von Gierke bvg at
Fri Aug 27 18:58:20 EDT 2004

ok try this modification, there seems to be a problem with the open 
socket command... maybe the socket is already open? the result will 
contain the error information.

on mouseUp

     open socket "" with message "socketOpen"

if the result <> "" then put the result

end mouseUp

if indeed the socket is already open, then you can close all sockets by 
using the command "resetall"
I just tested it, and indeed it does not close the socket. Strange, I 
have no idea why that could be?
anyway to read from the socket you need to know either the length of 
the returned data, or the delimiter at the end of the data (ie. return) 
then you can read from your socket

read from socket  "" until return
read from socket  "" for 20 chars

why don't you join the chat, we can help you live there :)
type this into the message box:
go stack URL ""

On Aug 28 2004, at 00:27, Keith Hutchison wrote:

> Hi Björnke
> Here is the code I have based on your example.
> I have breakpoints on each event, however only the first event, mouseup
> stops in the debugger.
> on mouseUp
>     open socket "" with message "socketOpen"
> end mouseUp
> on socketOpen theIP
>     write "Hello" to socket theIP with message "messageWritten"
> end socketOpen
> on messageWritten theIP
>     close socket theIP
> end messageWritten
> I know the port is open since I can send a command from a linux 
> command line
> extract...
> ns2: # PortCommandLiner.mwrb -a -p 4563 -c Hello -v
> World
> Any further ideas?

Chat with other RunRev developers:
go stack URL ""

More information about the Use-livecode mailing list