using system.action

Posted by jmls on 04-Nov-2014 04:25

I have some c# code that looks like this :

socket.On(Socket.EVENT_CONNECT, () =>
{
    socket.Emit("hi");
    socket.On("hi", (data) =>
    {
        Console.WriteLine(data);
        socket.Disconnect();
    });
});

now, how to convert that to OE ? so far, I have 

def var x as Client.Socket no-undo.

x = IO:Socket("http://192.168.99.205:49196").

def var y as System.Action.

x:on(Socket:EVENT_CONNECT,y).

message "here" view-as alert-box.

now, this works, connects to the server and gets to "here".

but how do I convert the c# function to OE and respond to the event ?

TIA

All Replies

Posted by Jean Richert on 14-Nov-2014 04:03

Anyone following this forum has a suggestion or even better a solution to share with Julian?

Posted by Mike Fechner on 14-Nov-2014 04:17
This thread is closed