//Mensaje recibido del server private static void OnSend(SocketWriter write, byte[] data) { //Debug.Log ("Mensaje recibido del serverr: " + message + " length of packets " + packets.Count); }
//Error mandando datos del server private static void OnErrorWriting(SocketWriter read, System.Exception exception) { lastErrorMsg = "Sending error: " + exception; }
public static void SendData(int dataToSend) { SocketWriter.Begin(dataToSend, socket, OnSend, OnErrorWriting); }