private void OnSocketData(byte[] data) { try { ByteArray buffer = new ByteArray(data); ioHandler.OnDataRead(buffer); } catch (Exception ex) { log.Error("## SocketDataError: " + ex.Message); BitSwarmEvent bitSwarmEvent = new BitSwarmEvent(BitSwarmEvent.DATA_ERROR); Hashtable hashtable = new Hashtable(); hashtable["message"] = ex.ToString(); bitSwarmEvent.Params = hashtable; DispatchEvent(bitSwarmEvent); } }
private void OnSocketData(string data) { ioHandler.OnDataRead(data); }