"accept" and socket read/write

Phil Davis revdev at pdslabs.net
Wed Feb 11 19:31:11 EST 2015


On 2/11/15 2:25 PM, Dr. Hawkins wrote:
> Am I reading the dictionary correctly?
>
> If I am, the accept command on the server end would use the same "read from
> socket" and "write from socket" commands as the client size uses?

Yes.
>
> So when I client first connects to set up a connection, the callback
> message on the serer would be used for authentication,

... or not, depending on the requirement ...

> after which the
> success/failure of authentication would be sent with the "write to"
> command, and future callbacks would have stored that the authentication had
> occurred and therefore proceed to do a "whatever" with more read/write
> messages?

Your code stores the authentication. That's not part of sockets.

>
> And all of these seem to be SSL?  Or do I have to supply my own encryption?

You supply your own. Fortunately LC makes it very easy.

>
> And then for the down the road issues, assuming that I'd be running on
> multi-core servers, could the initial connection actually distribute to a
> process one of the *n* cores--perhaps by telling the client it's assigned
> IP/port, at which point it would authenticate again?

As it stands right now, the engine is single-threaded so there's no 
distributing of anything to other cores within a single instance of your 
application. As for the future, I can't address that.

Phil Davis

>
>

-- 
Phil Davis





More information about the Use-livecode mailing list