question about sockets

Ian Summerfield iansummerfield at onetel.net.uk
Mon Oct 28 05:31:01 CST 2002


On 28/10/02 10:21 am, "Björnke von Gierke" <bvg at mac.com> scribed:


> I am trying to do some connection stuff using the open socket, write to
> socket, and accept socket in their datagram form.
> I run a by connecting to my own Jaguar mac, but I only can get one
> message through and I really don't know what's wrong...

> 
> first I open the outgoing socket:
>  open datagram socket to "127.0.0.1:4038|local"

You don't need to open the socket,  just use accept datagram alone.

You need to do something strange,  don't ask me why but I know it works.  In
your "contact" handler do the following:

 on contact fromWho, what
   -- do all your data stuff stuff here

   -- OS X fix
    if the platform && the systemversion contains "MacOS 10" then
      close socket 4038
      accept datagram connections on port 4038 with message "contact"
    end if
 end contact





More information about the use-livecode mailing list