Sockets

Keith Hutchison keith.hutchison at balance-infosystems.com
Fri Aug 27 18:01:11 EDT 2004


Hi Troy

> No. There is a lot wrong with it, to be blunt.  ;-)

Excellent!! ( Had to start somewhere :-) )

> The first line would probably look like -
> open socket to "127.0.0.1:4563" with message "MYOBContacts"
>
> But - "MYOBContacts" would be a handler in your scripts which the
> socket connection is going to make a callback to. It is the definition
> of a callback you are making there, not the message sent to the socket.
Is defining the call back like defining the name space for the socket?

In realbasic I would do something like this where kjtlTCPCommander is a
socket subclass
which handles all the read and write functions.

  TCPCommander = new kjtlTCPCommander
  TCPCommander.Address = Address
  TCPCommander.Port = Port
  if TCPCommander.Run( Command, Message ) then
    AdviseResult( 0, Verbose, Message )
  else
    AdviseResult( 1, Verbose, Message )
  end if


> That happens with a "write" command.
>
How do you access the socket object?

Keith Hutchison
Balance-Infosystems.Com

postgresql - mysql - dbf
Foxpro - Delphi - MS Access - REALbasic
http://balance-infosytems.com http://realopen.org



More information about the Use-livecode mailing list